Skip to content

Commit

Permalink
Removed bakerydemo-settings-local.py.example
Browse files Browse the repository at this point in the history
This file never worked, it caused a circular import loop since it attempts to `from bakerydemo.settings.dev import *` but the dev settings does:

```python
try:
    from .local import *  # noqa
except ImportError:
    pass
```

Fixed the `setup.sh` script to set the correct settings module environment variable

Fixes #68
  • Loading branch information
jsma authored and saevarom committed Nov 11, 2023
1 parent 0d4b9c6 commit 849497e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions bakerydemo-settings-local.py.example

This file was deleted.

4 changes: 2 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ fi
# Set up bakerydemo to use the Postgres database in the sister container
if [ ! -f bakerydemo/bakerydemo/settings/local.py ]; then
echo "Creating local settings file"
cp bakerydemo-settings-local.py.example bakerydemo/bakerydemo/settings/local.py
cp bakerydemo/bakerydemo/settings/local.py.example bakerydemo/bakerydemo/settings/local.py
fi

# Create a blank .env file in bakerydemo to keep its settings files from complaining
if [ ! -f bakerydemo/.env ]; then
echo "Creating file for local environment variables"
echo "DJANGO_SETTINGS_MODULE=bakerydemo.settings.local" > bakerydemo/.env
echo "DJANGO_SETTINGS_MODULE=bakerydemo.settings.dev" > bakerydemo/.env
fi

0 comments on commit 849497e

Please sign in to comment.