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
The tests checking the DNS resolution aren't reliable as they rely on specific
behavior of the DNS resolution on the local system. As they are reliable it
makes no sense to keep them as they are currently.
resolve some conflicts with templates
Conflicts:
binder/templates/bcommon/add_cname_record_form.html
binder/templates/bcommon/delete_record_initial.html
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.
* 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.
To improve the code quality of binder, this commit adds support for continuous
integration by using Travis CI (https://travis-ci.org/).
This will ensure that every commit and every pull request will trigger test
runs of the tests included in binder, helping to avoid code with broken tests.
Fixes three failing tests.
For test_ipinfo_ResolutionFail it fixes the following issues:
* failing when no network is available
* failing when Google changes the ip addresses of the service
* failing when the order of returned ip addresses is different
For test_DeleteRecordInitial_Empty and test_DeleteRecordInitial it fixes a not
existing BindServer object.
When requesting one of binders BIND server specific URLs for a server not
present in binders database currently uncatched exceptions are thrown.
This commit fixes that for all URLs containing the server name, by instead of
throwing an uncatched exception, returning a proper HTTP 404 status code.
While it might not be that common to have a DNS server listening on a
non-standard port for DNS queries, it's also useful for local testing.
I used the opportunity to add model migrations as well to enable smooth model
upgrades.
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.