netbox-plugin-dns 1.1.0b7__py3-none-any.whl → 1.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of netbox-plugin-dns might be problematic. Click here for more details.

Files changed (82) hide show
  1. netbox_dns/__init__.py +3 -2
  2. netbox_dns/api/nested_serializers.py +17 -16
  3. netbox_dns/api/serializers.py +1 -1
  4. netbox_dns/api/serializers_/record.py +1 -0
  5. netbox_dns/api/serializers_/{contact.py → registration_contact.py} +5 -5
  6. netbox_dns/api/serializers_/view.py +1 -0
  7. netbox_dns/api/serializers_/zone.py +5 -5
  8. netbox_dns/api/serializers_/zone_template.py +5 -5
  9. netbox_dns/api/urls.py +2 -2
  10. netbox_dns/api/views.py +7 -35
  11. netbox_dns/filtersets/__init__.py +1 -1
  12. netbox_dns/filtersets/nameserver.py +0 -0
  13. netbox_dns/filtersets/record.py +0 -0
  14. netbox_dns/filtersets/record_template.py +0 -0
  15. netbox_dns/filtersets/{contact.py → registration_contact.py} +4 -4
  16. netbox_dns/filtersets/zone.py +15 -15
  17. netbox_dns/filtersets/zone_template.py +15 -15
  18. netbox_dns/forms/__init__.py +1 -1
  19. netbox_dns/forms/nameserver.py +0 -0
  20. netbox_dns/forms/record.py +0 -0
  21. netbox_dns/forms/record_template.py +0 -0
  22. netbox_dns/forms/{contact.py → registration_contact.py} +16 -16
  23. netbox_dns/forms/view.py +29 -10
  24. netbox_dns/forms/zone.py +13 -13
  25. netbox_dns/forms/zone_template.py +13 -13
  26. netbox_dns/graphql/__init__.py +2 -2
  27. netbox_dns/graphql/filters.py +5 -5
  28. netbox_dns/graphql/schema.py +23 -53
  29. netbox_dns/graphql/types.py +39 -12
  30. netbox_dns/migrations/0007_alter_ordering_options.py +25 -0
  31. netbox_dns/migrations/{0007_view_prefixes.py → 0008_view_prefixes.py} +1 -1
  32. netbox_dns/migrations/0009_rename_contact_registrationcontact.py +36 -0
  33. netbox_dns/migrations/0010_view_ip_address_filter.py +18 -0
  34. netbox_dns/mixins/object_modification.py +30 -8
  35. netbox_dns/models/__init__.py +1 -1
  36. netbox_dns/models/nameserver.py +8 -3
  37. netbox_dns/models/record.py +47 -14
  38. netbox_dns/models/record_template.py +4 -1
  39. netbox_dns/models/registrar.py +7 -1
  40. netbox_dns/models/{contact.py → registration_contact.py} +15 -9
  41. netbox_dns/models/view.py +49 -2
  42. netbox_dns/models/zone.py +24 -18
  43. netbox_dns/models/zone_template.py +12 -9
  44. netbox_dns/navigation.py +7 -7
  45. netbox_dns/signals/ipam_dnssync.py +4 -4
  46. netbox_dns/tables/__init__.py +1 -1
  47. netbox_dns/tables/nameserver.py +1 -7
  48. netbox_dns/tables/record.py +10 -35
  49. netbox_dns/tables/record_template.py +0 -17
  50. netbox_dns/tables/registrar.py +0 -2
  51. netbox_dns/tables/{contact.py → registration_contact.py} +5 -6
  52. netbox_dns/tables/view.py +1 -8
  53. netbox_dns/tables/zone.py +0 -15
  54. netbox_dns/tables/zone_template.py +2 -16
  55. netbox_dns/templates/netbox_dns/{contact.html → registrationcontact.html} +1 -1
  56. netbox_dns/templates/netbox_dns/view.html +16 -0
  57. netbox_dns/urls/__init__.py +2 -2
  58. netbox_dns/urls/nameserver.py +14 -38
  59. netbox_dns/urls/record.py +7 -19
  60. netbox_dns/urls/record_template.py +18 -27
  61. netbox_dns/urls/registrar.py +11 -35
  62. netbox_dns/urls/registration_contact.py +60 -0
  63. netbox_dns/urls/view.py +8 -22
  64. netbox_dns/urls/zone.py +8 -46
  65. netbox_dns/urls/zone_template.py +16 -26
  66. netbox_dns/utilities/ipam_dnssync.py +58 -26
  67. netbox_dns/views/__init__.py +1 -1
  68. netbox_dns/views/nameserver.py +7 -3
  69. netbox_dns/views/record.py +12 -3
  70. netbox_dns/views/record_template.py +1 -1
  71. netbox_dns/views/registrar.py +0 -1
  72. netbox_dns/views/registration_contact.py +94 -0
  73. netbox_dns/views/view.py +6 -1
  74. netbox_dns/views/zone.py +7 -6
  75. netbox_dns/views/zone_template.py +2 -2
  76. {netbox_plugin_dns-1.1.0b7.dist-info → netbox_plugin_dns-1.1.2.dist-info}/METADATA +14 -14
  77. {netbox_plugin_dns-1.1.0b7.dist-info → netbox_plugin_dns-1.1.2.dist-info}/RECORD +80 -76
  78. {netbox_plugin_dns-1.1.0b7.dist-info → netbox_plugin_dns-1.1.2.dist-info}/WHEEL +2 -1
  79. netbox_plugin_dns-1.1.2.dist-info/top_level.txt +1 -0
  80. netbox_dns/urls/contact.py +0 -51
  81. netbox_dns/views/contact.py +0 -95
  82. {netbox_plugin_dns-1.1.0b7.dist-info → netbox_plugin_dns-1.1.2.dist-info}/LICENSE +0 -0
netbox_dns/__init__.py CHANGED
@@ -5,7 +5,7 @@ from ipam.choices import IPAddressStatusChoices
5
5
 
6
6
  from netbox_dns.choices import RecordTypeChoices
7
7
 
8
- __version__ = "1.1.0b7"
8
+ __version__ = "1.1.2"
9
9
 
10
10
 
11
11
  class DNSConfig(PluginConfig):
@@ -37,8 +37,9 @@ class DNSConfig(PluginConfig):
37
37
  "tolerate_underscores_in_labels": False,
38
38
  "tolerate_underscores_in_hostnames": False, # Deprecated, will be removed in 1.2.0
39
39
  "tolerate_leading_underscore_types": [
40
- RecordTypeChoices.TXT,
41
40
  RecordTypeChoices.SRV,
41
+ RecordTypeChoices.TLSA,
42
+ RecordTypeChoices.TXT,
42
43
  ],
43
44
  "tolerate_non_rfc1035_types": [],
44
45
  "enable_root_zones": False,
@@ -59,6 +59,22 @@ class NestedZoneSerializer(WritableNestedSerializer):
59
59
  ]
60
60
 
61
61
 
62
+ class NestedZoneTemplateSerializer(WritableNestedSerializer):
63
+ url = serializers.HyperlinkedIdentityField(
64
+ view_name="plugins-api:netbox_dns-api:zonetemplate-detail"
65
+ )
66
+
67
+ class Meta:
68
+ model = ZoneTemplate
69
+ fields = (
70
+ "id",
71
+ "url",
72
+ "name",
73
+ "display",
74
+ "description",
75
+ )
76
+
77
+
62
78
  class NestedRecordSerializer(WritableNestedSerializer):
63
79
  url = serializers.HyperlinkedIdentityField(
64
80
  view_name="plugins-api:netbox_dns-api:record-detail"
@@ -86,6 +102,7 @@ class NestedRecordSerializer(WritableNestedSerializer):
86
102
  "status",
87
103
  "ttl",
88
104
  "zone",
105
+ "managed",
89
106
  "active",
90
107
  ]
91
108
 
@@ -109,19 +126,3 @@ class NestedRecordTemplateSerializer(WritableNestedSerializer):
109
126
  "ttl",
110
127
  "description",
111
128
  )
112
-
113
-
114
- class NestedZoneTemplateSerializer(WritableNestedSerializer):
115
- url = serializers.HyperlinkedIdentityField(
116
- view_name="plugins-api:netbox_dns-api:zonetemplate-detail"
117
- )
118
-
119
- class Meta:
120
- model = ZoneTemplate
121
- fields = (
122
- "id",
123
- "url",
124
- "name",
125
- "display",
126
- "description",
127
- )
@@ -1,7 +1,7 @@
1
- from .serializers_.contact import *
2
1
  from .serializers_.nameserver import *
3
2
  from .serializers_.record import *
4
3
  from .serializers_.registrar import *
4
+ from .serializers_.registration_contact import *
5
5
  from .serializers_.view import *
6
6
  from .serializers_.zone import *
7
7
  from .serializers_.zone_template import *
@@ -87,5 +87,6 @@ class RecordSerializer(NetBoxModelSerializer):
87
87
  "status",
88
88
  "ttl",
89
89
  "description",
90
+ "managed",
90
91
  "active",
91
92
  )
@@ -2,19 +2,19 @@ from rest_framework import serializers
2
2
 
3
3
  from netbox.api.serializers import NetBoxModelSerializer
4
4
 
5
- from netbox_dns.models import Contact
5
+ from netbox_dns.models import RegistrationContact
6
6
 
7
7
 
8
- __all__ = ("ContactSerializer",)
8
+ __all__ = ("RegistrationContactSerializer",)
9
9
 
10
10
 
11
- class ContactSerializer(NetBoxModelSerializer):
11
+ class RegistrationContactSerializer(NetBoxModelSerializer):
12
12
  url = serializers.HyperlinkedIdentityField(
13
- view_name="plugins-api:netbox_dns-api:contact-detail"
13
+ view_name="plugins-api:netbox_dns-api:registrationcontact-detail"
14
14
  )
15
15
 
16
16
  class Meta:
17
- model = Contact
17
+ model = RegistrationContact
18
18
  fields = (
19
19
  "id",
20
20
  "url",
@@ -65,5 +65,6 @@ class ViewSerializer(NetBoxModelSerializer):
65
65
  "custom_fields",
66
66
  "tenant",
67
67
  "prefixes",
68
+ "ip_address_filter",
68
69
  )
69
70
  brief_fields = ("id", "url", "display", "name", "default_view", "description")
@@ -6,7 +6,7 @@ from tenancy.api.serializers import TenantSerializer
6
6
  from .view import ViewSerializer
7
7
  from .nameserver import NameServerSerializer
8
8
  from .registrar import RegistrarSerializer
9
- from .contact import ContactSerializer
9
+ from .registration_contact import RegistrationContactSerializer
10
10
  from .zone_template import ZoneTemplateSerializer
11
11
 
12
12
  from ..nested_serializers import NestedZoneSerializer
@@ -62,28 +62,28 @@ class ZoneSerializer(NetBoxModelSerializer):
62
62
  required=False,
63
63
  help_text="The registrar the domain is registered with",
64
64
  )
65
- registrant = ContactSerializer(
65
+ registrant = RegistrationContactSerializer(
66
66
  nested=True,
67
67
  many=False,
68
68
  read_only=False,
69
69
  required=False,
70
70
  help_text="The owner of the domain",
71
71
  )
72
- admin_c = ContactSerializer(
72
+ admin_c = RegistrationContactSerializer(
73
73
  nested=True,
74
74
  many=False,
75
75
  read_only=False,
76
76
  required=False,
77
77
  help_text="The administrative contact for the domain",
78
78
  )
79
- tech_c = ContactSerializer(
79
+ tech_c = RegistrationContactSerializer(
80
80
  nested=True,
81
81
  many=False,
82
82
  read_only=False,
83
83
  required=False,
84
84
  help_text="The technical contact for the domain",
85
85
  )
86
- billing_c = ContactSerializer(
86
+ billing_c = RegistrationContactSerializer(
87
87
  nested=True,
88
88
  many=False,
89
89
  read_only=False,
@@ -8,7 +8,7 @@ from netbox_dns.api.nested_serializers import NestedRecordTemplateSerializer
8
8
 
9
9
  from .nameserver import NameServerSerializer
10
10
  from .registrar import RegistrarSerializer
11
- from .contact import ContactSerializer
11
+ from .registration_contact import RegistrationContactSerializer
12
12
 
13
13
 
14
14
  __all__ = ("ZoneTemplateSerializer",)
@@ -38,28 +38,28 @@ class ZoneTemplateSerializer(NetBoxModelSerializer):
38
38
  required=False,
39
39
  help_text="The registrar the domain is registered with",
40
40
  )
41
- registrant = ContactSerializer(
41
+ registrant = RegistrationContactSerializer(
42
42
  nested=True,
43
43
  many=False,
44
44
  read_only=False,
45
45
  required=False,
46
46
  help_text="The owner of the domain",
47
47
  )
48
- admin_c = ContactSerializer(
48
+ admin_c = RegistrationContactSerializer(
49
49
  nested=True,
50
50
  many=False,
51
51
  read_only=False,
52
52
  required=False,
53
53
  help_text="The administrative contact for the domain",
54
54
  )
55
- tech_c = ContactSerializer(
55
+ tech_c = RegistrationContactSerializer(
56
56
  nested=True,
57
57
  many=False,
58
58
  read_only=False,
59
59
  required=False,
60
60
  help_text="The technical contact for the domain",
61
61
  )
62
- billing_c = ContactSerializer(
62
+ billing_c = RegistrationContactSerializer(
63
63
  nested=True,
64
64
  many=False,
65
65
  read_only=False,
netbox_dns/api/urls.py CHANGED
@@ -7,7 +7,7 @@ from netbox_dns.api.views import (
7
7
  NameServerViewSet,
8
8
  RecordViewSet,
9
9
  RegistrarViewSet,
10
- ContactViewSet,
10
+ RegistrationContactViewSet,
11
11
  ZoneTemplateViewSet,
12
12
  RecordTemplateViewSet,
13
13
  PrefixViewSet,
@@ -21,7 +21,7 @@ router.register("zones", ZoneViewSet)
21
21
  router.register("nameservers", NameServerViewSet)
22
22
  router.register("records", RecordViewSet)
23
23
  router.register("registrars", RegistrarViewSet)
24
- router.register("contacts", ContactViewSet)
24
+ router.register("contacts", RegistrationContactViewSet)
25
25
  router.register("zonetemplates", ZoneTemplateViewSet)
26
26
  router.register("recordtemplates", RecordTemplateViewSet)
27
27
 
netbox_dns/api/views.py CHANGED
@@ -1,6 +1,4 @@
1
1
  from rest_framework import serializers
2
- from rest_framework.decorators import action
3
- from rest_framework.response import Response
4
2
  from rest_framework.routers import APIRootView
5
3
 
6
4
  from ipam.models import Prefix
@@ -14,7 +12,7 @@ from netbox_dns.api.serializers import (
14
12
  NameServerSerializer,
15
13
  RecordSerializer,
16
14
  RegistrarSerializer,
17
- ContactSerializer,
15
+ RegistrationContactSerializer,
18
16
  ZoneTemplateSerializer,
19
17
  RecordTemplateSerializer,
20
18
  PrefixSerializer,
@@ -25,7 +23,7 @@ from netbox_dns.filtersets import (
25
23
  NameServerFilterSet,
26
24
  RecordFilterSet,
27
25
  RegistrarFilterSet,
28
- ContactFilterSet,
26
+ RegistrationContactFilterSet,
29
27
  ZoneTemplateFilterSet,
30
28
  RecordTemplateFilterSet,
31
29
  )
@@ -35,7 +33,7 @@ from netbox_dns.models import (
35
33
  NameServer,
36
34
  Record,
37
35
  Registrar,
38
- Contact,
36
+ RegistrationContact,
39
37
  ZoneTemplate,
40
38
  RecordTemplate,
41
39
  )
@@ -51,12 +49,6 @@ class ViewViewSet(NetBoxModelViewSet):
51
49
  serializer_class = ViewSerializer
52
50
  filterset_class = ViewFilterSet
53
51
 
54
- @action(detail=True, methods=["get"])
55
- def views(self, request, pk=None):
56
- views = View.objects.filter(zone=pk)
57
- serializer = ViewSerializer(views, many=True, context={"request": request})
58
- return Response(serializer.data)
59
-
60
52
 
61
53
  class ZoneViewSet(NetBoxModelViewSet):
62
54
  queryset = Zone.objects.prefetch_related(
@@ -70,32 +62,12 @@ class ZoneViewSet(NetBoxModelViewSet):
70
62
  serializer_class = ZoneSerializer
71
63
  filterset_class = ZoneFilterSet
72
64
 
73
- @action(detail=True, methods=["get"])
74
- def records(self, request, pk=None):
75
- records = Record.objects.filter(zone=pk)
76
- serializer = RecordSerializer(records, many=True, context={"request": request})
77
- return Response(serializer.data)
78
-
79
- @action(detail=True, methods=["get"])
80
- def nameservers(self, request, pk=None):
81
- nameservers = NameServer.objects.filter(zones__id=pk)
82
- serializer = NameServerSerializer(
83
- nameservers, many=True, context={"request": request}
84
- )
85
- return Response(serializer.data)
86
-
87
65
 
88
66
  class NameServerViewSet(NetBoxModelViewSet):
89
67
  queryset = NameServer.objects.prefetch_related("zones", "tenant")
90
68
  serializer_class = NameServerSerializer
91
69
  filterset_class = NameServerFilterSet
92
70
 
93
- @action(detail=True, methods=["get"])
94
- def zones(self, request, pk=None):
95
- zones = Zone.objects.filter(nameservers__id=pk)
96
- serializer = ZoneSerializer(zones, many=True, context={"request": request})
97
- return Response(serializer.data)
98
-
99
71
 
100
72
  class RecordViewSet(NetBoxModelViewSet):
101
73
  queryset = Record.objects.all().prefetch_related("zone", "zone__view", "tenant")
@@ -140,10 +112,10 @@ class RegistrarViewSet(NetBoxModelViewSet):
140
112
  filterset_class = RegistrarFilterSet
141
113
 
142
114
 
143
- class ContactViewSet(NetBoxModelViewSet):
144
- queryset = Contact.objects.all()
145
- serializer_class = ContactSerializer
146
- filterset_class = ContactFilterSet
115
+ class RegistrationContactViewSet(NetBoxModelViewSet):
116
+ queryset = RegistrationContact.objects.all()
117
+ serializer_class = RegistrationContactSerializer
118
+ filterset_class = RegistrationContactFilterSet
147
119
 
148
120
 
149
121
  class ZoneTemplateViewSet(NetBoxModelViewSet):
@@ -2,7 +2,7 @@ from .view import *
2
2
  from .zone import *
3
3
  from .nameserver import *
4
4
  from .record import *
5
- from .contact import *
5
+ from .registration_contact import *
6
6
  from .registrar import *
7
7
 
8
8
  from .zone_template import *
File without changes
File without changes
File without changes
@@ -2,15 +2,15 @@ from django.db.models import Q
2
2
 
3
3
  from netbox.filtersets import NetBoxModelFilterSet
4
4
 
5
- from netbox_dns.models import Contact
5
+ from netbox_dns.models import RegistrationContact
6
6
 
7
7
 
8
- __all__ = ("ContactFilterSet",)
8
+ __all__ = ("RegistrationContactFilterSet",)
9
9
 
10
10
 
11
- class ContactFilterSet(NetBoxModelFilterSet):
11
+ class RegistrationContactFilterSet(NetBoxModelFilterSet):
12
12
  class Meta:
13
- model = Contact
13
+ model = RegistrationContact
14
14
  fields = (
15
15
  "id",
16
16
  "name",
@@ -7,7 +7,7 @@ from netbox.filtersets import NetBoxModelFilterSet
7
7
  from tenancy.filtersets import TenancyFilterSet
8
8
  from utilities.filters import MultiValueCharFilter
9
9
 
10
- from netbox_dns.models import View, Zone, Registrar, Contact, NameServer
10
+ from netbox_dns.models import View, Zone, Registrar, RegistrationContact, NameServer
11
11
  from netbox_dns.choices import ZoneStatusChoices
12
12
 
13
13
 
@@ -95,44 +95,44 @@ class ZoneFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
95
95
  label="Registrar",
96
96
  )
97
97
  registrant_id = django_filters.ModelMultipleChoiceFilter(
98
- queryset=Contact.objects.all(),
98
+ queryset=RegistrationContact.objects.all(),
99
99
  label="Registrant ID",
100
100
  )
101
101
  registrant = django_filters.ModelMultipleChoiceFilter(
102
- queryset=Contact.objects.all(),
102
+ queryset=RegistrationContact.objects.all(),
103
103
  field_name="registrant__contact_id",
104
104
  to_field_name="contact_id",
105
105
  label="Registrant",
106
106
  )
107
107
  admin_c_id = django_filters.ModelMultipleChoiceFilter(
108
- queryset=Contact.objects.all(),
109
- label="Administrative Contact ID",
108
+ queryset=RegistrationContact.objects.all(),
109
+ label="Administrative RegistrationContact ID",
110
110
  )
111
111
  admin_c = django_filters.ModelMultipleChoiceFilter(
112
- queryset=Contact.objects.all(),
112
+ queryset=RegistrationContact.objects.all(),
113
113
  field_name="admin_c__contact_id",
114
114
  to_field_name="contact_id",
115
- label="Administrative Contact",
115
+ label="Administrative RegistrationContact",
116
116
  )
117
117
  tech_c_id = django_filters.ModelMultipleChoiceFilter(
118
- queryset=Contact.objects.all(),
119
- label="Technical Contact ID",
118
+ queryset=RegistrationContact.objects.all(),
119
+ label="Technical RegistrationContact ID",
120
120
  )
121
121
  tech_c = django_filters.ModelMultipleChoiceFilter(
122
- queryset=Contact.objects.all(),
122
+ queryset=RegistrationContact.objects.all(),
123
123
  field_name="tech_c__contact_id",
124
124
  to_field_name="contact_id",
125
- label="Technical Contact",
125
+ label="Technical RegistrationContact",
126
126
  )
127
127
  billing_c_id = django_filters.ModelMultipleChoiceFilter(
128
- queryset=Contact.objects.all(),
129
- label="Billing Contact ID",
128
+ queryset=RegistrationContact.objects.all(),
129
+ label="Billing RegistrationContact ID",
130
130
  )
131
131
  billing_c = django_filters.ModelMultipleChoiceFilter(
132
- queryset=Contact.objects.all(),
132
+ queryset=RegistrationContact.objects.all(),
133
133
  field_name="billing_c__contact_id",
134
134
  to_field_name="contact_id",
135
- label="Billing Contact",
135
+ label="Billing RegistrationContact",
136
136
  )
137
137
  active = django_filters.BooleanFilter(
138
138
  label="Zone is active",
@@ -9,7 +9,7 @@ from netbox_dns.models import (
9
9
  ZoneTemplate,
10
10
  RecordTemplate,
11
11
  Registrar,
12
- Contact,
12
+ RegistrationContact,
13
13
  NameServer,
14
14
  )
15
15
 
@@ -53,44 +53,44 @@ class ZoneTemplateFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
53
53
  label="Registrar",
54
54
  )
55
55
  registrant_id = django_filters.ModelMultipleChoiceFilter(
56
- queryset=Contact.objects.all(),
56
+ queryset=RegistrationContact.objects.all(),
57
57
  label="Registrant ID",
58
58
  )
59
59
  registrant = django_filters.ModelMultipleChoiceFilter(
60
- queryset=Contact.objects.all(),
60
+ queryset=RegistrationContact.objects.all(),
61
61
  field_name="registrant__contact_id",
62
62
  to_field_name="contact_id",
63
63
  label="Registrant",
64
64
  )
65
65
  admin_c_id = django_filters.ModelMultipleChoiceFilter(
66
- queryset=Contact.objects.all(),
67
- label="Administrative Contact ID",
66
+ queryset=RegistrationContact.objects.all(),
67
+ label="Administrative RegistrationContact ID",
68
68
  )
69
69
  admin_c = django_filters.ModelMultipleChoiceFilter(
70
- queryset=Contact.objects.all(),
70
+ queryset=RegistrationContact.objects.all(),
71
71
  field_name="admin_c__contact_id",
72
72
  to_field_name="contact_id",
73
- label="Administrative Contact",
73
+ label="Administrative RegistrationContact",
74
74
  )
75
75
  tech_c_id = django_filters.ModelMultipleChoiceFilter(
76
- queryset=Contact.objects.all(),
77
- label="Technical Contact ID",
76
+ queryset=RegistrationContact.objects.all(),
77
+ label="Technical RegistrationContact ID",
78
78
  )
79
79
  tech_c = django_filters.ModelMultipleChoiceFilter(
80
- queryset=Contact.objects.all(),
80
+ queryset=RegistrationContact.objects.all(),
81
81
  field_name="tech_c__contact_id",
82
82
  to_field_name="contact_id",
83
- label="Technical Contact",
83
+ label="Technical RegistrationContact",
84
84
  )
85
85
  billing_c_id = django_filters.ModelMultipleChoiceFilter(
86
- queryset=Contact.objects.all(),
87
- label="Billing Contact ID",
86
+ queryset=RegistrationContact.objects.all(),
87
+ label="Billing RegistrationContact ID",
88
88
  )
89
89
  billing_c = django_filters.ModelMultipleChoiceFilter(
90
- queryset=Contact.objects.all(),
90
+ queryset=RegistrationContact.objects.all(),
91
91
  field_name="billing_c__contact_id",
92
92
  to_field_name="contact_id",
93
- label="Billing Contact",
93
+ label="Billing RegistrationContact",
94
94
  )
95
95
 
96
96
  class Meta:
@@ -2,7 +2,7 @@ from .view import *
2
2
  from .zone import *
3
3
  from .nameserver import *
4
4
  from .record import *
5
- from .contact import *
5
+ from .registration_contact import *
6
6
  from .registrar import *
7
7
  from .zone_template import *
8
8
  from .record_template import *
File without changes
File without changes
File without changes
@@ -9,18 +9,18 @@ from netbox.forms import (
9
9
  from utilities.forms.fields import TagFilterField
10
10
  from utilities.forms.rendering import FieldSet
11
11
 
12
- from netbox_dns.models import Contact
12
+ from netbox_dns.models import RegistrationContact
13
13
 
14
14
 
15
15
  __all__ = (
16
- "ContactForm",
17
- "ContactFilterForm",
18
- "ContactImportForm",
19
- "ContactBulkEditForm",
16
+ "RegistrationContactForm",
17
+ "RegistrationContactFilterForm",
18
+ "RegistrationContactImportForm",
19
+ "RegistrationContactBulkEditForm",
20
20
  )
21
21
 
22
22
 
23
- class ContactForm(NetBoxModelForm):
23
+ class RegistrationContactForm(NetBoxModelForm):
24
24
  fieldsets = (
25
25
  FieldSet(
26
26
  "name",
@@ -37,13 +37,13 @@ class ContactForm(NetBoxModelForm):
37
37
  "fax",
38
38
  "fax_ext",
39
39
  "email",
40
- name="Contact",
40
+ name="RegistrationContact",
41
41
  ),
42
42
  FieldSet("tags", name="Tags"),
43
43
  )
44
44
 
45
45
  class Meta:
46
- model = Contact
46
+ model = RegistrationContact
47
47
  fields = (
48
48
  "name",
49
49
  "description",
@@ -63,8 +63,8 @@ class ContactForm(NetBoxModelForm):
63
63
  )
64
64
 
65
65
 
66
- class ContactFilterForm(NetBoxModelFilterSetForm):
67
- model = Contact
66
+ class RegistrationContactFilterForm(NetBoxModelFilterSetForm):
67
+ model = RegistrationContact
68
68
 
69
69
  fieldsets = (
70
70
  FieldSet("q", "filter_id", "tag"),
@@ -89,7 +89,7 @@ class ContactFilterForm(NetBoxModelFilterSetForm):
89
89
  )
90
90
  contact_id = forms.CharField(
91
91
  required=False,
92
- label="Contact ID",
92
+ label="RegistrationContact ID",
93
93
  )
94
94
  organization = forms.CharField(
95
95
  required=False,
@@ -128,12 +128,12 @@ class ContactFilterForm(NetBoxModelFilterSetForm):
128
128
  email = forms.CharField(
129
129
  required=False,
130
130
  )
131
- tag = TagFilterField(Contact)
131
+ tag = TagFilterField(RegistrationContact)
132
132
 
133
133
 
134
- class ContactImportForm(NetBoxModelImportForm):
134
+ class RegistrationContactImportForm(NetBoxModelImportForm):
135
135
  class Meta:
136
- model = Contact
136
+ model = RegistrationContact
137
137
  fields = (
138
138
  "name",
139
139
  "description",
@@ -153,8 +153,8 @@ class ContactImportForm(NetBoxModelImportForm):
153
153
  )
154
154
 
155
155
 
156
- class ContactBulkEditForm(NetBoxModelBulkEditForm):
157
- model = Contact
156
+ class RegistrationContactBulkEditForm(NetBoxModelBulkEditForm):
157
+ model = RegistrationContact
158
158
 
159
159
  name = forms.CharField(
160
160
  required=False,