Skip to content

Commit

Permalink
fix import user to works in old django
Browse files Browse the repository at this point in the history
  • Loading branch information
valdergallo committed Oct 8, 2016
1 parent fd211a3 commit 0f77cbc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data_importer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
from django.contrib.contenttypes.models import ContentType

# port settings.AUTH_USER_MODEL
# from django.contrib.auth import get_user_model
User = settings.AUTH_USER_MODEL
try:
User = settings.AUTH_USER_MODEL
except AttributeError:
from django.contrib.auth.models import User


DJANGO_VERSION = StrictVersion(django.get_version())

Expand Down

0 comments on commit 0f77cbc

Please sign in to comment.