コード例 #1
0
ファイル: utils.py プロジェクト: rawjam/django-allauth
def user_display(user):
    global _user_display_callable
    if not _user_display_callable:
        f = getattr(settings, "ACCOUNT_USER_DISPLAY",
                    lambda user: user.username)
        _user_display_callable = import_callable(f)
    return _user_display_callable(user)
コード例 #2
0
ファイル: utils.py プロジェクト: m-thielen/django-allauth
def user_display(user):
    global _user_display_callable
    if not _user_display_callable:
        f = getattr(settings, "ACCOUNT_USER_DISPLAY",
                    lambda user: user.username)
        _user_display_callable = import_callable(f)
    return _user_display_callable(user)
コード例 #3
0
ファイル: utils.py プロジェクト: vunhatminh241191/SoulightRd
def user_display(user):
    global _user_display_callable
    if not _user_display_callable:
        f = getattr(settings, "ACCOUNT_USER_DISPLAY",
                    default_user_display)
        _user_display_callable = import_callable(f)
    return _user_display_callable(user)
コード例 #4
0
ファイル: provider.py プロジェクト: avsd/django-allauth
 def _get_locale_callable(self):
     settings = self.get_settings()
     f = settings.get('LOCALE_FUNC')
     if f:
         f = import_callable(f)
     else:
         f = get_default_locale_callable()
     return f
コード例 #5
0
ファイル: provider.py プロジェクト: TankTopTV/django-allauth
 def _get_locale_callable(self):
     settings = self.get_settings()
     f = settings.get('LOCALE_FUNC')
     if f:
         f = import_callable(f)
     else:
         f = get_default_locale_callable()
     return f
コード例 #6
0
 def _get_locale_callable(self):
     settings = self.get_settings()
     func = settings.get("LOCALE_FUNC")
     return import_callable(func) if func else get_default_locale_callable()
コード例 #7
0
def user_display(user):
    global _user_display_callable
    if not _user_display_callable:
        f = getattr(settings, "ACCOUNT_USER_DISPLAY", default_user_display)
        _user_display_callable = import_callable(f)
    return _user_display_callable(user)