acardona/CATMAID — Issue #266: Change how settings.py / settings_apache.py work
Author: mhl
Created: 2012-02-28 15:32:27+00:00
State: open

(This is a similar idea to Issue #69, but for the Django instead of PHP backend.)

Currently, someone installing CATMAID's Django backend has to copy `settings.py.example` to `settings.py` and edit the latter to match their local installation. One of the first things that `settings.py` does is to import everything from `settings_base.py` which (along with `settings.py.example`) is kept in the repository.

A problem with this is that when a new setting becomes required by the Django backend, the developer will add it to `settings.py.example`, but this is never checked until an error occurs. Also, no sanity-checking is done on the settings.

It would be nicer to have `settings.py` committed in the repository with the contents of `settings_base.py` and for it to import a `settings_local.py` afterwards if such a file exists. Finally, `settings.py` can check that all the required variable have been set, and been set to sensible values.

[For all the above you could read `s/settings/settings_apache/`]