Skip to content

Commit 676f211

Browse files
committed
Fix explanation of .env and local.py
As of d7a607a both local.py and .env are initially empty, as the bakerydemo.settings.dev module is directly usable as DJANGO_SETTINGS_MODULE. Update the explanation in readme.md to reflect this.
1 parent 2ba19b0 commit 676f211

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

readme.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ cd bakerydemo
154154
pip install -r requirements/development.txt
155155
```
156156

157-
Next, we'll set up our local environment variables. We use [django-dotenv](https://github.com/jpadilla/django-dotenv)
158-
to help with this. It reads environment variables located in a file name `.env` in the top level directory of the project. The only variable we need to start is `DJANGO_SETTINGS_MODULE`:
157+
Next, we need to create the files `.env` and `bakerydemo/settings/local.py`, which provide a place for local configuration settings that need to be kept outside of version control. No such settings are required for a standard installation, but warnings will be displayed if these files are not present:
159158
```bash
160159
cp bakerydemo/settings/local.py.example bakerydemo/settings/local.py
161160
cp .env.example .env
@@ -194,6 +193,12 @@ Make a pull request to https://github.com/wagtail/bakerydemo
194193

195194
# Other notes
196195

196+
### Local configuration files
197+
198+
The `bakerydemo/settings/local.py` file can be used to store local Django settings such as database connection details that need to be kept outside of version control.
199+
200+
Additionally, various settings can be controlled through environment variables. The [django-dotenv](https://github.com/jpadilla/django-dotenv) package is used to load these variables from a `.env` file in the project root.
201+
197202
### Note on demo search
198203

199204
Because we can't (easily) use ElasticSearch for this demo, we use wagtail's native DB search.

0 commit comments

Comments
 (0)