Added bulk import views for cluster types and groups

This commit is contained in:
Jeremy Stretch
2017-10-09 15:49:48 -04:00
parent 977cad3830
commit a38cd449c5
5 changed files with 42 additions and 2 deletions

View File

@@ -38,6 +38,17 @@ class ClusterTypeForm(BootstrapMixin, forms.ModelForm):
fields = ['name', 'slug']
class ClusterTypeCSVForm(forms.ModelForm):
slug = SlugField()
class Meta:
model = ClusterType
fields = ['name', 'slug']
help_texts = {
'name': 'Name of cluster type',
}
#
# Cluster groups
#
@@ -50,6 +61,17 @@ class ClusterGroupForm(BootstrapMixin, forms.ModelForm):
fields = ['name', 'slug']
class ClusterGroupCSVForm(forms.ModelForm):
slug = SlugField()
class Meta:
model = ClusterGroup
fields = ['name', 'slug']
help_texts = {
'name': 'Name of cluster group',
}
#
# Clusters
#