Standardized declaration of csv_headers on models

This commit is contained in:
Jeremy Stretch
2018-02-02 14:26:16 -05:00
parent 9f07379800
commit cea1c45635
12 changed files with 153 additions and 73 deletions

View File

@@ -47,7 +47,7 @@ class SecretRoleCSVForm(forms.ModelForm):
class Meta:
model = SecretRole
fields = ['name', 'slug']
fields = SecretRole.csv_headers
help_texts = {
'name': 'Name of secret role',
}
@@ -98,7 +98,7 @@ class SecretCSVForm(forms.ModelForm):
class Meta:
model = Secret
fields = ['device', 'role', 'name', 'plaintext']
fields = Secret.csv_headers
help_texts = {
'name': 'Name or username',
}