This commit adds support for Django 1.9. As the template configuration options
changed with Django 1.8 and versions earlier than 1.8 aren't supported anymore
anyway by upstream, support for them is removed.
To have the Dockerfile still working, this commit also changes its logic so the
dependencies get directly installed via the requirements.txt from PyPI, which
will ensure that always matching versions of all dependencies are present (e.g.
the Django version).
Notable changes are:
* Refactored views, utilizing more of Djangos features, resulting in simpler
code.
* URLs are now the same when initially filling out a form and when editing a
submitted form which contained errors.
* Instead of a result page showing the response from the DNS server (which is
now logged using Djangos "logging" functionality) the user is now redirected
back to the record listing of the current zone when the action was successful
or stays on the form page when an error occured. Proper success/error
messages are shown in both cases by utilizing Djangos "messages"
functionality.
This commit adds global authentication to binder to ensure that only valid
users are able to use it. This should enable binder to be used in
environemts where it's webfrontend is reachable for unauthenticated users as
well.
For setups where such a global authentication isn't desired it can be disabled
by simply removing the LoginRequiredMiddleware from the list of active
middlewares.
Up to now local_settings.py was used for binder specific configuration values.
This commit moves these values to settings.py, removes local_settings.py
from version control and adds logic to settings.py to allow settings in
local_settings.py to overwrite ones defined in settings.py, enabling
local_settings.py to be used as installation specific configuration file,
e.g. for custom database configuration.
To quote from Djangos documentation:
"The secret key must be a large random value and it must be kept secret."
https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/#secret-key
This commit achieves that by generating a file containing a random string
when running the first time and by using this string as SECRET_KEY from then
on.