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:
@@ -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}),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user