Пример #1
0
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
Пример #2
0
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
Пример #3
0
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
        if 'USERNAME_FIELD' not in User.__dict__:
            User.USERNAME_FIELD = 'username'
        return User
Пример #4
0
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
        if 'USERNAME_FIELD' not in User.__dict__:
            User.USERNAME_FIELD = 'username'
        return User
Пример #5
0
def get_user_model():

    from django.contrib.auth import get_user_model as gum
    return gum()
Пример #6
0
def get_user_model():

    from django.contrib.auth import get_user_model as gum
    return gum()
Пример #7
0
 def get_user_model():
     return gum()