diff --git a/nsupdate/main/forms.py b/nsupdate/main/forms.py index 95c1b77..cad4cbe 100644 --- a/nsupdate/main/forms.py +++ b/nsupdate/main/forms.py @@ -22,7 +22,8 @@ class EditHostForm(forms.ModelForm): class CreateDomainForm(forms.ModelForm): class Meta(object): model = Domain - exclude = ['created_by'] + fields = ['domain', 'nameserver_ip', 'nameserver_update_algorithm', + 'public', 'available', 'comment'] widgets = { 'domain': forms.widgets.TextInput(attrs=dict(autofocus=None)), } diff --git a/nsupdate/main/models.py b/nsupdate/main/models.py index 98f2dcf..8d6af22 100644 --- a/nsupdate/main/models.py +++ b/nsupdate/main/models.py @@ -65,7 +65,8 @@ class Domain(models.Model): help_text="Shared secret that allows updating this zone (base64 encoded)") nameserver_update_algorithm = models.CharField( max_length=16, # see elements of UPDATE_ALGORITHM_CHOICES - default=UPDATE_ALGORITHM_DEFAULT, choices=UPDATE_ALGORITHM_CHOICES) + default=UPDATE_ALGORITHM_DEFAULT, choices=UPDATE_ALGORITHM_CHOICES, + help_text="HMAC_SHA512 is fine for bind9 (you can change this later, if needed)") public = models.BooleanField( default=False, help_text="Check to allow any user to add dynamic hosts to this zone - " diff --git a/nsupdate/main/templates/main/domain.html b/nsupdate/main/templates/main/domain.html index b17e8af..8ec8f4a 100644 --- a/nsupdate/main/templates/main/domain.html +++ b/nsupdate/main/templates/main/domain.html @@ -7,6 +7,10 @@
You can't change the domain name. If you want to have another domain name, you have to delete this domain and create a new one.
++ Please note that update algorithm and update secret need to match. + Just create a new secret after submitting this form with a changed update algorithm. +
New nameserver shared secret generated for you. Everytime you visit this page a new secret will be generated and the old one becomes invalid.
+Algorithm: {{ object.get_bind9_algorithm }}
Secret: {{ shared_secret }}
+ +