From 1cc4236d5865304d3579c3948d65fc88034a2de4 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 27 Oct 2013 11:59:16 +0100 Subject: [PATCH] add help texts to Domain model fields, improve view --- nsupdate/main/models.py | 21 +++++++++++++------ .../main/templates/main/domain_overview.html | 4 ++-- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/nsupdate/main/models.py b/nsupdate/main/models.py index 1de22de..f592692 100644 --- a/nsupdate/main/models.py +++ b/nsupdate/main/models.py @@ -45,18 +45,27 @@ UPDATE_ALGORITHMS = ( class Domain(models.Model): - domain = models.CharField(max_length=256, unique=True) + domain = models.CharField( + max_length=256, unique=True, + help_text="Name of the zone where dynamic hosts may get added") nameserver_ip = models.GenericIPAddressField( max_length=256, - help_text="IP where the dynamic updates for this domain will be sent to") - nameserver_update_key = models.CharField(max_length=256) + help_text="IP where the dynamic DNS updates for this zone will be sent to") + nameserver_update_key = models.CharField( + max_length=256, + help_text="Shared secret that allows updating this zone (base64 encoded)") nameserver_update_algorithm = models.CharField( max_length=256, default='HMAC_SHA512', choices=UPDATE_ALGORITHMS) - # public means that this domain/nameserver is available for everybody - public = models.BooleanField(default=False) + public = models.BooleanField( + default=False, + help_text="Check to allow any user to add dynamic hosts to this zone - " + "if not checked, we'll only allow the owner to add hosts") # available means "nameserver for domain operating and reachable" - # gets set to False if we have trouble reaching the nameserver - available = models.BooleanField(default=True) + available = models.BooleanField( + default=True, + help_text="Check if nameserver is available/reachable - " + "if not checked, we'll pause querying/updating this nameserver for a while") last_update = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) diff --git a/nsupdate/main/templates/main/domain_overview.html b/nsupdate/main/templates/main/domain_overview.html index 061fc66..9987ab4 100644 --- a/nsupdate/main/templates/main/domain_overview.html +++ b/nsupdate/main/templates/main/domain_overview.html @@ -36,7 +36,7 @@
-
+

Add a new Domain

@@ -46,7 +46,7 @@
-
+

Help

Here you can add new domains (zones) which you control (and this is only useful if you