django-authority/authority/utils.py

11 lines
200 B
Python
Raw Normal View History

from django.contrib import auth
def get_user_class():
if hasattr(auth, "get_user_model"):
return auth.get_user_model()
else:
return auth.models.User
User = get_user_class()