powerdns-admin/app/templates
Thomas M Steenholdt 6c8a3ac36c Move setting definitions into code (rather than database).
For a setting to be useful, the code has to be able to make sense of it anyway. For this reason it makes sense, that the available settings are defined within the code, rather than in the database, where a missing row has previously caused problems. Instead, settings are now written to the database, when they are changed.

So instead of relying on the database initialization process to create all available settings for us in the database, the supported settings and their defaults are now in a `defaults` dict in the Setting class. With this in place, we can stop populating the `setting` table as a part of database initialization and it will be much easier to support new settings in the future (we no longer need to do anything to the database, to achieve that).

Another benefit is that any changes to default values will take effect automatically, unless the admin has already modified that setting to his/her liking.

To make it easier to get the value of a setting, falling back to defaults etc, a new function `get` has been added to the Setting class. Call it as `Setting().get('setting_name'), and it will take care of returning a setting from the database or return the default value for that setting, if nothing was found.

The `get` function returns `None`, if the setting passed to the function, does not exist in the `Setting.defaults` dict - Indicating that we don't know of a setting by that name.
2018-06-21 22:06:38 -02:00
..
errors added custom error page for SAML authentication errors 2017-11-03 12:24:25 +01:00
admin_createuser.html Adjustment to prevent exception in Google/Github authentication when local user cannot be created 2018-03-30 17:43:34 +07:00
admin_editaccount.html Implement per account domain access 2018-06-05 16:42:44 -02:00
admin_history.html Adjustment to have History sorts by oldest first. Fix #245 2018-04-18 12:11:00 +07:00
admin_manageaccount.html Initial support for Accounts 2018-06-04 13:10:02 -02:00
admin_manageuser.html Restrict certain admin changes on the current user 2018-06-06 09:15:25 -02:00
admin_settings.html Move setting definitions into code (rather than database). 2018-06-21 22:06:38 -02:00
admin.html Convert tabs to spaces in HTML template files. 2016-06-18 11:41:01 +07:00
base.html Merge remote-tracking branch 'kaechele/use-webassets' 2018-06-13 09:58:15 +07:00
dashboard_domain.html Initial support for Accounts 2018-06-04 13:10:02 -02:00
dashboard.html Merge remote-tracking branch 'tmuncks/initial-accounts' 2018-06-12 16:17:55 +07:00
domain_add.html Initial support for Accounts 2018-06-04 13:10:02 -02:00
domain_management.html Initial support for Accounts 2018-06-04 13:10:02 -02:00
domain.html Check zone serial before allowing user to submit their change. #183 2018-04-12 11:18:44 +07:00
dyndns.html Add dyndns feature 2016-06-20 16:32:14 +07:00
login.html Add webassets support 2018-06-11 21:16:28 +02:00
maintenance.html Initial commit 2015-12-13 16:34:12 +07:00
register.html Add webassets support 2018-06-11 21:16:28 +02:00
template_add.html Add first working draft of domain templating functionality 2018-02-07 22:30:29 +03:00
template_edit.html Added the ability to create a template based on the zone records 2018-02-07 22:44:46 +03:00
template.html Join "Edit" and "Delete" button into th on templates page 2018-02-07 22:44:59 +03:00
user_profile.html Fix #234 2018-04-08 09:09:08 +07:00