Commit Graph

33 Commits

Author SHA1 Message Date
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 1af8f1e31b encrypt TSIG keys using Fernet cryptography library 2017-05-02 20:21:11 -04:00
Jeffrey Forman 90e38d2aef enable the edit_record link, URL, and view 2017-04-17 20:29:55 -04:00
Jeffrey Forman 7fdcfab8a0 add support to add CNAME in zone, loosen restrictions on record data input 2016-11-12 07:44:03 -05:00
Jeffrey Forman 2bb8f5d9cb resurrect the ability to add a PTR record on its own, not as part of a pair of forward records 2015-12-26 15:14:29 -05:00
Jeffrey Forman e9d65179ab on the cname add result, we need the cname name, not the originating record name 2015-12-26 14:32:07 -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 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
Daniel Roschka 20d785840b Fixes some python style issues.
No changes in binders functionality are included in this commit, just improved
python style
2015-06-13 12:05:42 +02:00
jeffrey forman d625e0245b Merge branch 'revised-local-settings' of https://github.com/Dunedan/binder into Dunedan-revised-local-settings
fixed import of get_object_or_404 which was erroneously removed

Conflicts:
	binder/views.py
2015-05-27 20:14:50 -04:00
Daniel Roschka 581dc915fe Change in the behavior of local_settings.py
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.
2015-04-02 10:26:29 +02:00
Daniel Roschka 6a769e4cbb Fixes the behavior for not existing BIND servers
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.
2015-03-29 14:04:43 +02: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
Jeffrey Forman 8679f1cc5f Merge pull request #16 from Dunedan/fix-form-data
Fixes missing form data when rendering the add record template after an error.
2015-03-25 21:24:58 -04:00
Daniel Roschka 382cf4ae26 Fixes missing form data when rendering the add record template after an error. 2015-03-23 21:10:15 +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
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 b803923331 print error if encountered in deleting records form 2012-12-16 11:21:44 -05:00
Jeffrey Forman acd9ec596c Add unit tests for add cname form and add record form testing 2012-12-13 01:40:12 -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
Jeffrey Forman 9dcb07e996 Display IP address along side server name in server list 2012-11-26 22:05:44 -05:00
Jeffrey Forman ba78f39670 collapse add forward and add reverse helper functions into update_record.
clean up some handling of cname creation.
2012-11-25 22:35:11 -05:00
Jeffrey Forman b28bfbacd5 remove errant print statements from views 2012-11-25 18:06:11 -05:00
Jeffrey Forman 0736eb3eb5 error handling around viewing unresponsive dns servers in zones. add try/except when adding cname 2012-11-25 18:02:33 -05:00
Jeffrey Forman c492fb508c clean up delete_record view using formdeletecord 2012-11-23 22:42:37 -05:00
Jeffrey Forman a5af78d18d clean up some string casting for adding cname and forward/reverse records. 2012-11-21 22:08:37 -05:00
Jeffrey Forman 751dae3356 clean up some String casting in making a cname that isnt needed 2012-11-21 20:39:08 -05:00
Jeffrey Forman fc971391b9 more cleanup, adding docstrings, bit more exception handling. 2012-11-18 21:10:09 -05:00
Jeffrey Forman 94fa3cbb43 slowly moving to using custom exceptions, removing unnecessary code 2012-11-17 23:02:57 -05:00
Jeffrey Forman 9f2bbdee0f combine all the result templates into one response_result.htm
standardize on the dictionary returned back from helpers, and to the template
2012-10-28 20:32:37 -04:00
Jeffrey Forman eb717e001a Bring things up to 1.4 standards. A LOT of file moves, simplifying of paths. Removed bcommon directory under binder 2012-10-28 14:49:15 -04:00