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

Added dynamic examples for CSV form fields

This commit is contained in:
Jeremy Stretch
2017-06-06 17:27:26 -04:00
parent 1ddd7415cb
commit d122f9f700
6 changed files with 45 additions and 9 deletions

View File

@ -146,6 +146,10 @@ class SiteCSVForm(forms.ModelForm):
'name', 'slug', 'region', 'tenant', 'facility', 'asn', 'physical_address', 'shipping_address',
'contact_name', 'contact_phone', 'contact_email', 'comments',
]
help_texts = {
'slug': 'URL-friendly slug',
'asn': '32-bit autonomous system number',
}
class SiteBulkEditForm(BootstrapMixin, CustomFieldBulkEditForm):
@ -271,13 +275,15 @@ class RackCSVForm(forms.ModelForm):
'invalid_choice': 'Role not found.',
}
)
type = forms.CharField(required=False)
class Meta:
model = Rack
fields = [
'site', 'group', 'name', 'facility_id', 'tenant', 'role', 'type', 'width', 'u_height', 'desc_units',
]
help_texts = {
'type': 'Rack type',
}
def clean_group(self):