예제 #1
0
def extra(request):
    """
    Context processor to inject (and cache queryset) the bank accounts of the
    current user.
    """
    data = {}

    if request.user.is_authenticated:
        data['user_bankaccounts'] = BankAccount.objects.get_user_bankaccounts(
            request.user)

    if settings.MYMONEY['USE_L10N_DIST']:
        data['dist_js_src'] = "dist/js/mymoney.min.{lang}.js".format(
            lang=get_language_upper())
    else:
        data['dist_js_src'] = 'dist/js/mymoney.min.js'

    return data
예제 #2
0
def extra(request):
    """
    Context processor to inject (and cache queryset) the bank accounts of the
    current user.
    """
    data = {}

    if request.user.is_authenticated:
        data['user_bankaccounts'] = BankAccount.objects.get_user_bankaccounts(
            request.user
        )

    if settings.MYMONEY['USE_L10N_DIST']:
        data['dist_js_src'] = "dist/js/mymoney.min.{lang}.js".format(lang=get_language_upper())
    else:
        data['dist_js_src'] = 'dist/js/mymoney.min.js'

    return data
예제 #3
0
def language_to_upper(lang):
    """
    Force language given to be uppercase.
    """
    return get_language_upper(lang)
예제 #4
0
파일: core_tags.py 프로젝트: ychab/mymoney
def language_to_upper(lang):
    """
    Force language given to be uppercase.
    """
    return get_language_upper(lang)