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

Converted circuits import views to new scheme

This commit is contained in:
Jeremy Stretch
2017-06-02 13:40:52 -04:00
parent a598f0e632
commit 4a8147f8a5
10 changed files with 57 additions and 135 deletions

View File

@@ -36,10 +36,12 @@ class TenantForm(BootstrapMixin, CustomFieldForm):
class TenantCSVForm(forms.ModelForm):
slug = SlugField()
group = forms.ModelChoiceField(
queryset=TenantGroup.objects.all(),
required=False,
to_field_name='name',
help_text='Name of parent group',
error_messages={
'invalid_choice': 'Group not found.'
}
@@ -48,6 +50,10 @@ class TenantCSVForm(forms.ModelForm):
class Meta:
model = Tenant
fields = ['name', 'slug', 'group', 'description', 'comments']
help_texts = {
'name': 'Tenant name',
'comments': 'Free-form comments'
}
class TenantBulkEditForm(BootstrapMixin, CustomFieldBulkEditForm):