Cleaned up import statements

This commit is contained in:
Jeremy Stretch
2018-11-02 15:20:08 -04:00
parent 521a989d23
commit f8a961b568
25 changed files with 24 additions and 30 deletions

View File

@@ -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

View File

@@ -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.',

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,5 +1,3 @@
import sys
from django.conf import settings
from django.db import ProgrammingError
from django.http import Http404, HttpResponseRedirect

View File

@@ -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

View File

@@ -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