1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Move fieldsets out of Meta for model forms

This commit is contained in:
jeremystretch
2022-01-31 15:52:36 -05:00
parent cf3ca5a661
commit ccb3a75281
11 changed files with 206 additions and 170 deletions

View File

@@ -52,14 +52,15 @@ class TenantForm(NetBoxModelForm):
required=False
)
fieldsets = (
('Tenant', ('name', 'slug', 'group', 'description', 'tags')),
)
class Meta:
model = Tenant
fields = (
'name', 'slug', 'group', 'description', 'comments', 'tags',
)
fieldsets = (
('Tenant', ('name', 'slug', 'group', 'description', 'tags')),
)
#
@@ -105,14 +106,15 @@ class ContactForm(NetBoxModelForm):
required=False
)
fieldsets = (
('Contact', ('group', 'name', 'title', 'phone', 'email', 'address', 'tags')),
)
class Meta:
model = Contact
fields = (
'group', 'name', 'title', 'phone', 'email', 'address', 'comments', 'tags',
)
fieldsets = (
('Contact', ('group', 'name', 'title', 'phone', 'email', 'address', 'tags')),
)
widgets = {
'address': SmallTextarea(attrs={'rows': 3}),
}