Commit Graph

92 Commits

Author SHA1 Message Date
Eric van der Vlist f063831578 Supporting Django 3. 2020-04-18 09:35:28 +02:00
jeffrey forman 17da7b33a3 make exceptions a bit more module-path happy. fix some iterator references 2019-03-17 20:44:55 -04:00
Jeffrey Forman 90e38d2aef enable the edit_record link, URL, and view 2017-04-17 20:29:55 -04:00
Jeffrey Forman ddae5be662 Move edit/add/cname key_name and ttl form items to just use choice item instead of trying to define each element 2017-04-17 20:26:01 -04:00
Jeffrey Forman ff8088defa add request context_processor and printing serving hostname to footer
eventually this will make lead to making it a bit more docker/kubernetes friendly
2017-03-25 15:53:09 -04:00
Jeffrey Forman 0252c3df62 make Binder docker-friendly again. built on python image with django 1.10 2016-12-05 21:56:49 -05:00
Daniel Roschka 74cc4efca4 Adds support for Django 1.9 while dropping support for unsupported versions.
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).
2016-02-06 19:21:52 +01:00
Jeffrey Forman ab9b28d525 Merge branch 'refactored-views' of https://github.com/Dunedan/binder into Dunedan-refactored-views 2015-12-26 14:10:11 -05:00
jeffrey forman f5b557384a Merge branch 'master' of github.com:jforman/binder 2015-11-20 09:44:42 -05:00
jeffrey forman a3c5eab978 fix missing div tags 2015-11-20 09:42:56 -05:00
Daniel Roschka e13b42cd13 Refactors the views used to add and delete records.
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.
2015-09-05 19:03:21 +02:00
Daniel Roschka 7492febf08 Provide a template for not existing resources.
Will be of course only used if debugging is disabled.
2015-08-23 20:35:30 +02:00
Daniel Roschka ecea7964a1 Improves the rendering of forms and refactors some of their logic.
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.
2015-08-04 20:27:02 +02:00
jeffrey forman 9e5991df2c Merge branch 'responsive-layout' of https://github.com/Dunedan/binder into Dunedan-responsive-layout
Conflicts:
	binder/templates/base.html
2015-07-28 06:16:56 -04:00
Daniel Roschka 515876a2a5 Merge branch 'master' into add-global-authentication 2015-06-08 19:24:36 +02:00
Daniel Roschka f41133d733 Responsive layout for better experience on mobile devices
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
2015-06-05 16:50:48 +02:00
jeffrey forman a92553e6d8 Merge branch 'static-template-tag' of https://github.com/Dunedan/binder into Dunedan-static-template-tag 2015-06-03 20:13:16 -04:00
Daniel Roschka 9ed2be3b66 Use the static template tag when refering to static files. 2015-05-31 08:10:19 +02:00
Daniel Roschka 5476314232 Replaces hardcoded links in templates with Djangos url tag. 2015-05-30 22:27:25 +02:00
Daniel Roschka 2ffd7c4b39 Resolve merge conflict introduced with recent changes to master. 2015-05-30 18:17:29 +02:00
jeffrey forman 5effaf8c45 Merge branch 'template-cleanup' of https://github.com/Dunedan/binder into Dunedan-template-cleanup
resolve some conflicts with templates

Conflicts:
	binder/templates/bcommon/add_cname_record_form.html
	binder/templates/bcommon/delete_record_initial.html
2015-05-27 20:03:33 -04:00
Daniel Roschka 7882ee9121 Add global authentication
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.
2015-04-05 21:06:01 +02:00
Jeffrey Forman dc15440a98 Merge pull request #32 from Dunedan/fix-missing-cancel-buttons
Fixes missing cancel buttons
2015-04-05 14:09:07 -04:00
jeffrey forman 796cb06055 Merge branch 'ship-jquery' of https://github.com/Dunedan/binder into Dunedan-ship-jquery 2015-04-05 07:22:23 -04:00
jeffrey forman 5c35b2306e delete commented out HTML that was forgotten from before 2015-04-04 22:07:37 -04:00
Daniel Roschka f6d95c2ac2 Fixes missing cancel buttons
The cancel buttons on the forms introduced with
1671bc4c2f vanished with
41f78b3eff.
This commit adds them back.
2015-04-02 19:21:33 +02:00
Daniel Roschka c885c823b5 Removes a broken label assignment from the form to add CNAMEs. 2015-04-02 13:41:28 +02:00
Daniel Roschka 8a67eeb8c5 Fixes label assignment to fields for radio button fields. 2015-04-02 13:39:18 +02:00
Daniel Roschka d46ffd1abc Clean up of various parts of the templates
* 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
2015-04-02 08:32:27 +02:00
jeffrey forman 41f78b3eff move to bootstrap 3 (3.3.4). fairly significant template update 2015-04-01 21:28:56 -04:00
Daniel Roschka a5ebc7bad7 Ship jQuery with binder
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.
2015-04-01 15:22:13 +02:00
jeffrey forman e0768ae67a Merge branch 'htm-to-html' of https://github.com/Dunedan/binder into Dunedan-htm-to-html 2015-03-28 08:53:35 -04:00
Daniel Roschka 8be9a4b2e3 Renaming all templates from *.htm to *.html
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.
2015-03-26 22:13:42 +01:00
Daniel Roschka 270bb80921 Commit 448d18f8f9 introduced some problems, which
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.
2015-03-25 18:48:13 +01:00
jeffrey forman 5c90f80e8d Merge branch 'select-default-key' of https://github.com/Dunedan/binder into Dunedan-select-default-key
Conflicts:
	binder/templates/bcommon/list_zone.htm
2015-03-24 20:48:15 -04:00
jeffrey forman 448d18f8f9 make every cancel/delete action link a button 2015-03-24 20:19:30 -04:00
Daniel Roschka 0b21800bae Fixed the name of the variable holding the key on the add CNAME page. 2015-03-23 18:39:08 +01:00
Daniel Roschka a449443340 Automatically select the default key for the current server when doing actions.
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.
2015-03-22 21:20:12 +01:00
Daniel Roschka c3e454e88b Added the cancel link on the page for adding CNAME records as well. 2015-03-22 20:52:46 +01:00
Daniel Roschka 1671bc4c2f Added buttons to cancel forms and fixed the styling of some buttons. 2015-03-22 18:34:40 +01:00
Jeffrey Forman e48f4ad5b0 make server zone list table sortable by column 2014-01-05 17:53:13 -05:00
Jeffrey Forman d8900c4075 convert to using pybindxml for scraping zone/server information from bind in server zone list 2014-01-05 17:50:13 -05:00
Jeffrey Forman c2daf46358 update url template references to be django 1.5 friendly 2013-12-01 18:05:01 -05:00
Jeffrey Forman 5ec7fc02c9 Add sorttable.js to static, ability to sort zone list table 2013-03-21 21:18:03 -04:00
Jeffrey Forman 9e95181936 Add ability to directly create reverse PTR records. Not the best, but it works. 2012-12-25 19:57:00 -05:00
Jeffrey Forman a7bc198c4d Convert template URL href references to use 'url' template syntax for reverse URLs 2012-12-15 20:25:06 -05:00
Jeffrey Forman 3a9e9fe614 dont show the 'add reverse record' checkbox if on form for adding reverse record 2012-12-12 21:12:58 -05:00
Jeffrey Forman aa76d59a13 add choice selection to record type when adding record. works for A/AAAA records. 2012-12-02 09:13:22 -05:00
Jeffrey Forman 42db5cedee create local_settings, pass TTL_CHOICES around to be able to pick TTL when creating record. 2012-12-02 08:49:49 -05:00
Jeffrey Forman d4d4afdaa1 Add ip info on server list page.
Also clean up imports, standardize on order
2012-11-28 22:09:25 -05:00