Newer
Older
postorius / src / mailmanweb / context_processors.py
@Florian Fuchs Florian Fuchs on 12 Mar 2012 622 bytes - moved all remains of mailman_django to mailmanweb
import logging


from django.conf import settings
from django.utils.translation import gettext as _
from mailman.client import Client
from urllib2 import HTTPError


logger = logging.getLogger(__name__)


def mailmanweb(request):
    """Add template variables to context.
    """
    # extend_template (no page header/footer when requested via AJAX)
    if request.is_ajax():
        extend_template = "mailmanweb/base_ajax.html"        
    else:        
        extend_template = "mailmanweb/base.html"

    return {
        'MAILMAN_THEME': settings.MAILMAN_THEME,
        'extend_template': extend_template,
        }