resurrect the ability to add a PTR record on its own, not as part of a pair of forward records
This commit is contained in:
parent
e9d65179ab
commit
2bb8f5d9cb
|
@ -77,7 +77,8 @@ class FormAddReverseRecord(forms.Form):
|
|||
"is PTR."})
|
||||
zone_name = forms.CharField(max_length=100)
|
||||
record_data = CustomStringPeriodSuffix(required=True)
|
||||
ttl = forms.ChoiceField(choices=settings.TTL_CHOICES)
|
||||
ttl = forms.ChoiceField(choices=settings.TTL_CHOICES,
|
||||
widget=forms.RadioSelect)
|
||||
key_name = forms.ModelChoiceField(queryset=Key.objects.all(),
|
||||
required=False,
|
||||
widget=forms.RadioSelect,
|
||||
|
|
|
@ -65,6 +65,9 @@ def view_add_record(request, dns_server, zone_name):
|
|||
this_server = get_object_or_404(models.BindServer, hostname=dns_server)
|
||||
|
||||
if request.method == 'POST':
|
||||
if "in-addr.arpa" in zone_name or "ip6.arpa" in zone_name:
|
||||
form = forms.FormAddReverseRecord(request.POST)
|
||||
else:
|
||||
form = forms.FormAddForwardRecord(request.POST)
|
||||
if form.is_valid():
|
||||
form_cleaned = form.cleaned_data
|
||||
|
|
Loading…
Reference in New Issue