Projet

Général

Profil

Télécharger (624 octets) Statistiques
| Branche: | Tag: | Révision:

root / auquotidien / modules / template.py @ cb4c30bc

1 3e037e2e Frédéric Péters
from wcs.qommon import template
2 c2ffbce0 Frédéric Péters
3 29a82c1d Frédéric Péters
wcs_get_decorate_vars = template.get_decorate_vars
4 c2ffbce0 Frédéric Péters
5 2663e08e Frédéric Péters
6 29a82c1d Frédéric Péters
def get_decorate_vars(body, response, generate_breadcrumb=True, template_context=None, **kwargs):
7
    if template_context and 'form_side' in template_context:
8
        # force rendering as it will put new variables in the context
9
        template_context['form_side'] = template_context['form_side']()
10 c2ffbce0 Frédéric Péters
11 b7a2808c Frédéric Péters
    for key in ('bigdiv', 'gauche'):
12 01ae3cb4 Frédéric Péters
        if not key in response.filter:
13 b7a2808c Frédéric Péters
            response.filter[key] = None
14
15 29a82c1d Frédéric Péters
    return wcs_get_decorate_vars(body, response, generate_breadcrumb)
16
17
18
template.get_decorate_vars = get_decorate_vars