Source

django-minimizer / djangominimizer / context_processors.py

from djangominimizer import settings


def minimizer_settings(request):
    """
    Adds minimizer_settings variables to the context.
    """
    context_data = {
        'MINIMIZER_COFFEE_SUPPORT': settings.COFFEE_SUPPORT,
        'MINIMIZER_LESS_SUPPORT': settings.LESS_SUPPORT,
        'MINIMIZER_DEBUG': settings.MINIMIZER_DEBUG,
        'MINIMIZER_JQUERY_VERSION': settings.JQUERY_VERSION,
        'MINIMIZER_DESCRIPTION': settings.DESCRIPTION,
        'MINIMIZER_AUTHOR': settings.AUTHOR,
        'MINIMIZER_GOOGLE_ANALYTICS_CODE': settings.GOOGLE_ANALYTICS_CODE
    }

    if settings.LESS_SUPPORT:
        context_data.update({'MINIMIZER_LESS_JS_PATH': settings.LESS_JS_PATH})

    return context_data