context_processors.py 515 Bytes
Newer Older
1 2
from .forms import DossierSearchForm, RepresentativeSearchForm

3
from memopol_settings.models import Setting
4 5


6 7 8 9 10
def search_forms(request):
    return {
        'representative_search_form': RepresentativeSearchForm(request.GET),
        'dossier_search_form': DossierSearchForm(request.GET)
    }
11 12 13 14 15 16 17 18 19 20


def intro_text(request):
    d = {}

    for s in Setting.objects.filter(pk__in=['HOMEPAGE_INTRO_TEXT',
                                            'HOMEPAGE_INSTANCE_TEXT']):
        d[s.pk] = s.comment

    return d