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."})
|
"is PTR."})
|
||||||
zone_name = forms.CharField(max_length=100)
|
zone_name = forms.CharField(max_length=100)
|
||||||
record_data = CustomStringPeriodSuffix(required=True)
|
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(),
|
key_name = forms.ModelChoiceField(queryset=Key.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
widget=forms.RadioSelect,
|
widget=forms.RadioSelect,
|
||||||
|
|
|
@ -65,7 +65,10 @@ def view_add_record(request, dns_server, zone_name):
|
||||||
this_server = get_object_or_404(models.BindServer, hostname=dns_server)
|
this_server = get_object_or_404(models.BindServer, hostname=dns_server)
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
form = forms.FormAddForwardRecord(request.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():
|
if form.is_valid():
|
||||||
form_cleaned = form.cleaned_data
|
form_cleaned = form.cleaned_data
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue