Commit 670c4d24 by benjaoming

#145 - add compatibility layer for importing users

parent 60c24e6a
"""Abstraction layer to deal with Django related changes in order to keep
compatibility with several Django versions simultaneously."""
from django import VERSION as DJANGO_VERSION
def get_user_model():
if DJANGO_VERSION >= (1,5):
from django.contrib.auth import get_user_model as gum
return gum()
else:
from django.contrib.auth.models import User
return User
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 to comment