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

ExportTemplate.template_language to slug (#3569)

This commit is contained in:
Jeremy Stretch
2019-12-05 17:01:00 -05:00
parent 2583823e5f
commit 89e720cb77
6 changed files with 61 additions and 14 deletions

View File

@@ -98,3 +98,23 @@ class ObjectChangeActionChoices(ChoiceSet):
ACTION_UPDATE: 2,
ACTION_DELETE: 3,
}
#
# ExportTemplates
#
class ExportTemplateLanguageChoices(ChoiceSet):
LANGUAGE_DJANGO = 'django'
LANGUAGE_JINJA2 = 'jinja2'
CHOICES = (
(LANGUAGE_DJANGO, 'Django'),
(LANGUAGE_JINJA2, 'Jinja2'),
)
LEGACY_MAP = {
LANGUAGE_DJANGO: 10,
LANGUAGE_JINJA2: 20,
}