mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-20 04:12:25 -06:00
Cleaned up import statements
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from collections import OrderedDict
|
||||
import pytz
|
||||
|
||||
import pytz
|
||||
from django.conf import settings
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
|
||||
@@ -3,7 +3,6 @@ from django.db import models
|
||||
|
||||
from .forms import ColorSelect
|
||||
|
||||
|
||||
ColorValidator = RegexValidator(
|
||||
regex='^[0-9a-f]{6}$',
|
||||
message='Enter a valid hexadecimal RGB color code.',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import csv
|
||||
from io import StringIO
|
||||
import json
|
||||
import re
|
||||
from io import StringIO
|
||||
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# noinspection PyUnresolvedReferences
|
||||
from django.core.management.commands.makemigrations import Command
|
||||
from django.db import models
|
||||
|
||||
from . import custom_deconstruct
|
||||
|
||||
models.Field.deconstruct = custom_deconstruct
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# noinspection PyUnresolvedReferences
|
||||
from django.core.management.commands.migrate import Command
|
||||
from django.db import models
|
||||
|
||||
from . import custom_deconstruct
|
||||
|
||||
models.Field.deconstruct = custom_deconstruct
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import sys
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import ProgrammingError
|
||||
from django.http import Http404, HttpResponseRedirect
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import datetime
|
||||
import json
|
||||
import six
|
||||
|
||||
from django.core.serializers import serialize
|
||||
from django.http import HttpResponse
|
||||
@@ -25,7 +24,7 @@ def csv_format(data):
|
||||
value = value.isoformat()
|
||||
|
||||
# Force conversion to string first so we can check for any commas
|
||||
if not isinstance(value, six.string_types):
|
||||
if not isinstance(value, str):
|
||||
value = '{}'.format(value)
|
||||
|
||||
# Double-quote the value if it contains a comma
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from collections import OrderedDict
|
||||
from copy import deepcopy
|
||||
import sys
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib import messages
|
||||
@@ -23,8 +23,8 @@ from django.views.generic import View
|
||||
from django_tables2 import RequestConfig
|
||||
|
||||
from extras.models import CustomField, CustomFieldValue, ExportTemplate
|
||||
from utilities.utils import queryset_to_csv
|
||||
from utilities.forms import BootstrapMixin, CSVDataField
|
||||
from utilities.utils import queryset_to_csv
|
||||
from .error_handlers import handle_protectederror
|
||||
from .forms import ConfirmationForm
|
||||
from .paginator import EnhancedPaginator
|
||||
|
||||
Reference in New Issue
Block a user