Skip to content

Commit eaa9c9d

Browse files
committed
Update settings.py
1 parent 4e3a14a commit eaa9c9d

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,3 @@ The mailman servers are installed using https://github.com/cppalliance/ansible-m
1717
- The settings.py file in ansible has been refactored so that instead of being an ansible template, it is static and leverages environment variables. See [settings.py](./settings.py).
1818

1919
- **Environment Variables**: Copy file `env.template` to `.env` and adjust values to match your local environment.
20-
21-
- settings.py now includes an "import settings_custom" at the end of the file. One idea is to add customizations in [settings_custom.py](./settings_custom.py). If there are general improvements any mailman installation would use, put those in settings.py itself and submit the changes back to the ansible repository also.
22-

settings.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,12 @@
195195
# Add custom middleware to set REMOTE_ADDR when using a unix domain socket
196196
MIDDLEWARE = MIDDLEWARE + (env("ADD_REMOTE_ADDR_MIDDLEWARE", None),)
197197

198-
try:
199-
import settings_custom
200-
except:
201-
pass
198+
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
202199

200+
STATICFILES_DIRS = [
201+
os.path.join(BASE_DIR, 'static_custom')
202+
]
203+
204+
TEMPLATES[0]['DIRS'] = [
205+
os.path.join(BASE_DIR, 'templates')
206+
]

settings_custom.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)