from django import forms

from cyder.cydns.forms import DNSForm
from cyder.cydns.ptr.models import PTR


class PTRForm(DNSForm):
    def delete_instance(self, instance):
        instance.delete()

    class Meta:
        model = PTR
        exclude = ('ip', 'reverse_domain', 'ip_upper',
                   'ip_lower')
        widgets = {'views': forms.CheckboxSelectMultiple}

from django import forms

from cyder.cydns.forms import DNSForm
from cyder.cydns.ptr.models import PTR


class PTRForm(DNSForm):
    def delete_instance(self, instance):
        instance.delete()

    class Meta:
        model = PTR
        exclude = ('ip', 'reverse_domain', 'ip_upper',
                   'ip_lower')
        widgets = {'views': forms.CheckboxSelectMultiple,
                   'ip_type': forms.RadioSelect}

Make ip_type a RadioSelect in the PTR form
Make ip_type a RadioSelect in the PTR form

  from django import forms
  
  from cyder.cydns.forms import DNSForm
  from cyder.cydns.ptr.models import PTR
  
  
  class PTRForm(DNSForm):
      def delete_instance(self, instance):
          instance.delete()
  
      class Meta:
          model = PTR
          exclude = ('ip', 'reverse_domain', 'ip_upper',
                     'ip_lower')
-         widgets = {'views': forms.CheckboxSelectMultiple}
+         widgets = {'views': forms.CheckboxSelectMultiple,
+                    'ip_type': forms.RadioSelect}
  
Make ip_type a RadioSelect in the PTR form
## Code Before:
from django import forms

from cyder.cydns.forms import DNSForm
from cyder.cydns.ptr.models import PTR


class PTRForm(DNSForm):
    def delete_instance(self, instance):
        instance.delete()

    class Meta:
        model = PTR
        exclude = ('ip', 'reverse_domain', 'ip_upper',
                   'ip_lower')
        widgets = {'views': forms.CheckboxSelectMultiple}

## Instruction:
Make ip_type a RadioSelect in the PTR form
## Code After:
from django import forms

from cyder.cydns.forms import DNSForm
from cyder.cydns.ptr.models import PTR


class PTRForm(DNSForm):
    def delete_instance(self, instance):
        instance.delete()

    class Meta:
        model = PTR
        exclude = ('ip', 'reverse_domain', 'ip_upper',
                   'ip_lower')
        widgets = {'views': forms.CheckboxSelectMultiple,
                   'ip_type': forms.RadioSelect}
