Commit fd5e2b1d by Daniel Hahler

Sort imports

`isort taggit/**.py tests/**.py`
parent 9b0c9d46
from __future__ import unicode_literals
from django.contrib import admin
from taggit.models import Tag, TaggedItem
......
from __future__ import unicode_literals
from django import forms
from django.utils.translation import ugettext as _
from django.utils import six
from taggit.utils import parse_tags, edit_string_for_tags
from django.utils.translation import ugettext as _
from taggit.utils import edit_string_for_tags, parse_tags
class TagWidget(forms.TextInput):
......
from __future__ import unicode_literals
from operator import attrgetter
from django import VERSION
try:
from django.contrib.contenttypes.fields import GenericRelation
except ImportError: # django < 1.7
from django.contrib.contenttypes.generic import GenericRelation
from django.contrib.contenttypes.models import ContentType
from django.db import models, router
from django.db.models.fields import Field
from django.db.models.fields.related import ManyToManyRel, RelatedField, add_lazy_relation
from django.db.models.fields.related import (add_lazy_relation, ManyToManyRel,
RelatedField)
from django.db.models.related import RelatedObject
from django.utils import six
from django.utils.text import capfirst
from django.utils.translation import ugettext_lazy as _
from django.utils import six
from taggit.forms import TagField
from taggit.models import GenericTaggedItemBase, TaggedItem
from taggit.utils import require_instance_manager
try:
from django.contrib.contenttypes.fields import GenericRelation
except ImportError: # django < 1.7
from django.contrib.contenttypes.generic import GenericRelation
try:
from django.db.models.related import PathInfo
except ImportError:
pass # PathInfo is not used on Django < 1.6
from taggit.forms import TagField
from taggit.models import TaggedItem, GenericTaggedItemBase
from taggit.utils import require_instance_manager
def _model_name(model):
......
from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.db import IntegrityError, models, transaction
from django.db.models.query import QuerySet
from django.template.defaultfilters import slugify as default_slugify
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext
try:
from django.contrib.contenttypes.fields import GenericForeignKey
except ImportError: # django < 1.7
from django.contrib.contenttypes.generic import GenericForeignKey
from django.db import models, IntegrityError, transaction
from django.db.models.query import QuerySet
from django.template.defaultfilters import slugify as default_slugify
from django.utils.translation import ugettext_lazy as _, ugettext
from django.utils.encoding import python_2_unicode_compatible
try:
......
from __future__ import unicode_literals
from django.utils import six
from django.utils.encoding import force_text
from django.utils.functional import wraps
from django.utils import six
def parse_tags(tagstring):
......
......@@ -3,8 +3,7 @@ from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.shortcuts import get_object_or_404
from django.views.generic.list import ListView
from taggit.models import TaggedItem, Tag
from taggit.models import Tag, TaggedItem
def tagged_object_list(request, slug, queryset, **kwargs):
......
from __future__ import unicode_literals, absolute_import
from __future__ import absolute_import, unicode_literals
from django import forms, VERSION
from .models import Food, DirectFood, CustomPKFood, OfficialFood
from .models import CustomPKFood, DirectFood, Food, OfficialFood
fields = None
if VERSION >= (1, 6):
......
......@@ -2,10 +2,9 @@ from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from taggit.managers import TaggableManager
from taggit.models import (TaggedItemBase, GenericTaggedItemBase, TaggedItem,
TagBase, Tag)
from taggit.models import (GenericTaggedItemBase, Tag, TagBase, TaggedItem,
TaggedItemBase)
# Ensure that two TaggableManagers with custom through model are allowed.
......
from __future__ import unicode_literals, absolute_import
from __future__ import absolute_import, unicode_literals
from unittest import TestCase as UnitTestCase
try:
from unittest import skipIf, skipUnless
except:
from django.utils.unittest import skipIf, skipUnless
import django
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.contrib.contenttypes.models import ContentType
from django.core import serializers
from django.db import connection
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.test import TestCase, TransactionTestCase
from django.utils import six
from django.utils.encoding import force_text
from taggit.managers import _model_name, _TaggableManager, TaggableManager
from taggit.models import Tag, TaggedItem
from taggit.utils import edit_string_for_tags, parse_tags
from django.contrib.contenttypes.models import ContentType
from .forms import CustomPKFoodForm, DirectFoodForm, FoodForm, OfficialFoodForm
from .models import (Article, CustomManager, CustomPKFood, CustomPKHousePet,
CustomPKPet, DirectFood, DirectHousePet, DirectPet, Food,
HousePet, Movie, OfficialFood, OfficialHousePet,
OfficialPet, OfficialTag, OfficialThroughModel, Pet,
Photo, TaggedCustomPKFood, TaggedCustomPKPet, TaggedFood,
TaggedPet)
from taggit.managers import TaggableManager, _TaggableManager, _model_name
from taggit.models import Tag, TaggedItem
from .forms import (FoodForm, DirectFoodForm, CustomPKFoodForm,
OfficialFoodForm)
from .models import (Food, Pet, HousePet, DirectFood, DirectPet,
DirectHousePet, TaggedFood, CustomPKFood, CustomPKPet, CustomPKHousePet,
TaggedCustomPKFood, OfficialFood, OfficialPet, OfficialHousePet,
OfficialThroughModel, OfficialTag, Photo, Movie, Article, CustomManager)
from taggit.utils import parse_tags, edit_string_for_tags
try:
from unittest import skipIf, skipUnless
except ImportError:
from django.utils.unittest import skipIf, skipUnless
class BaseTaggingTest(object):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment