mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Relocate ImportFormatChoices
This commit is contained in:
@@ -197,3 +197,19 @@ class ButtonColorChoices(ChoiceSet):
|
||||
(BLACK, 'Black'),
|
||||
(WHITE, 'White'),
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
# Import Choices
|
||||
#
|
||||
|
||||
class ImportFormatChoices(ChoiceSet):
|
||||
CSV = 'csv'
|
||||
JSON = 'json'
|
||||
YAML = 'yaml'
|
||||
|
||||
CHOICES = [
|
||||
(CSV, 'CSV'),
|
||||
(JSON, 'JSON'),
|
||||
(YAML, 'YAML'),
|
||||
]
|
||||
|
@@ -1,17 +0,0 @@
|
||||
from utilities.choices import ChoiceSet
|
||||
|
||||
|
||||
#
|
||||
# Import Choices
|
||||
#
|
||||
|
||||
class ImportFormatChoices(ChoiceSet):
|
||||
CSV = 'csv'
|
||||
JSON = 'json'
|
||||
YAML = 'yaml'
|
||||
|
||||
CHOICES = [
|
||||
(CSV, 'CSV'),
|
||||
(JSON, 'JSON'),
|
||||
(YAML, 'YAML'),
|
||||
]
|
@@ -7,8 +7,8 @@ import yaml
|
||||
from django import forms
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from utilities.choices import ImportFormatChoices
|
||||
from utilities.forms.utils import parse_csv
|
||||
from .choices import ImportFormatChoices
|
||||
from .widgets import APISelect, APISelectMultiple, ClearableFileInput, StaticSelect
|
||||
|
||||
__all__ = (
|
||||
|
@@ -9,7 +9,7 @@ from django.urls import reverse
|
||||
from extras.choices import ObjectChangeActionChoices
|
||||
from extras.models import ObjectChange
|
||||
from users.models import ObjectPermission
|
||||
from utilities.forms.choices import ImportFormatChoices
|
||||
from utilities.choices import ImportFormatChoices
|
||||
from .base import ModelTestCase
|
||||
from .utils import disable_warnings, post_data
|
||||
|
||||
|
Reference in New Issue
Block a user