Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #485 from leonardoo/compat-apps-django-1.7
Browse files Browse the repository at this point in the history
apps django for 1.7
  • Loading branch information
swistakm committed Jun 15, 2015
2 parents a790f75 + 916a407 commit 230a582
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions userena/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ class SiteProfileNotAvailable(Exception):
from hashlib import sha1 as sha_constructor, md5 as md5_constructor
except ImportError: # pragma: no cover
from django.utils.hashcompat import sha_constructor, md5_constructor

if django.VERSION < (1, 7, 0):
from django.db.models import get_model
else:
from django.apps import apps
get_model = apps.get_model
4 changes: 2 additions & 2 deletions userena/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from django.conf import settings
from django.db.models import get_model

from django.utils.six import text_type
from django.utils.six.moves.urllib.parse import urlencode

from userena import settings as userena_settings
from userena.compat import SiteProfileNotAvailable
from userena.compat import SiteProfileNotAvailable, get_model
from userena.compat import sha_constructor, md5_constructor

import urllib, random, datetime
Expand Down

0 comments on commit 230a582

Please sign in to comment.