Skip to content

Commit

Permalink
Merge ffefc18 into 2237710
Browse files Browse the repository at this point in the history
  • Loading branch information
vstoykov committed Feb 21, 2017
2 parents 2237710 + ffefc18 commit 676679a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions autoslug/fields.py
Expand Up @@ -15,11 +15,6 @@
from django.db.models.signals import post_save

# 3rd-party
try:
from south.modelsinspector import introspector
except ImportError:
introspector = lambda self: [], {}

try:
from modeltranslation import utils as modeltranslation_utils
except ImportError:
Expand Down Expand Up @@ -303,9 +298,14 @@ def pre_save(self, instance, add):

return slug


def south_field_triple(self):
"Returns a suitable description of this field for South."
# Only south will call this method and there is no need to try to
# import it at top level. This also fix problem with Django 1.9+
# when South is still in the environment,
# https://bitbucket.org/neithere/django-autoslug/issues/47/after-project-upgrade-from-older-django
from south.modelsinspector import introspector

args, kwargs = introspector(self)
kwargs.update({
'populate_from': 'None' if callable(self.populate_from) else repr(self.populate_from),
Expand Down

0 comments on commit 676679a

Please sign in to comment.