Пример #1
0
def get_user_language(user):
    """ Simple helper that will fire django signal in order to get User language possibly given by other part of application.
    :param user:
    :return: string or None
    """
    return_value = {}
    user_language.send(sender=user, user=user, return_value=return_value)
    return return_value.get('language')
Пример #2
0
def get_user_language(user):
    """ Simple helper that will fire django signal in order to get User language possibly given by other part of application.
    :param user:
    :return: string or None
    """
    return_value = {}
    user_language.send(sender=user, user=user, return_value=return_value)
    return return_value.get('language')