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.
Changes are:
* Display invalid input in editable input fields instead of adding it to the
end of the error message. This should improve user experience in case of
typos etc. where they now can simply edit there previously entered value.
* Use a single variable for form data and form errors, instead of using two.
Makes the code a bit cleaner.
This commit changes the layout of binder to provide a better experience on
mobile devices and for form validation errors. It's outcome might not be
perfect yet, but I believe it's a really nice step forward.
The changes consist of:
* moving the menu from the left side to the top, so it doesn't consume
additional screen space when scrolling down
* changed the width of the content to depend on the screen size. For larger
screens the forms won't consume the whole width, but validation errors will
be shown beside the form field containing the error
* showing field independent error messages on top of each form
* highlighting of form fields which contain errors
resolve some conflicts with templates
Conflicts:
binder/templates/bcommon/add_cname_record_form.html
binder/templates/bcommon/delete_record_initial.html
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.
* Replaced tabs for indentation with proper spaces to have only spaces for
indentation
* Added the btn-default class to all buttons where it was missing
* Added relations between labels and the elements they are labeling using the
naming schema Django uses by default (might become handy in the future)
* Added additional meta tags required by Bootstrap 3
* Moved the button for adding records in list_zone.html out of the table to get
cleaner markup
* Swapped out the used version of Bootstrap against the minified one.
* Removed the commented out old code from delete_record_initial.html, because
that's why we have version control
Up to now jQuery has been the only resource required by binder which users had
to load from the internet. To enable binder to work in environments where no
internet access is available this commit adds jQuery 2.1.3 to binders static
files so no internet access is necessary anymore for using binder.
When using Djangos "makemessages" command to collect strings for i18n it only
considers templates with a file extenions of .txt and .html by default. For
more details see:
https://docs.djangoproject.com/en/dev/topics/i18n/translation/#message-files
Also when Django is refering to default template names (e.g. for error handling
or accounts) it always refers to file names with .html as file extension.
To avoid hassle in the future this commit aligns the file extension used for
templates to Djangos default of .html.
are fixed in this commit:
* Cancel links were converted to buttons, by simply wrapping them into a
<button>-element, causing them to act as submit buttons, as submit is the
default action for buttons, instead of cancel buttons. Instead the proper
bootstrap code for showing links as buttons is used now.
* add_cname_record_form.htm hasn't been adjusted to show a button instead of a
link for cancelling. I converted that to a button now as well.
This commit introduces automatic selection of the default TSIG key for all
available actions (add, delete). For enabling that it has been necessary to
provide the whole BindServer object to the template, which caused some
additional changes.
I also took the opportunity to unify some styling (indentation, linebreaks) of
the HTML templates.