Mercurial > kallithea
view CONTRIBUTORS @ 4850:a40824531f68
controllers: don't pass rendered templates in context variables
Some controllers used the followifng pattern:
- render a data template into a context variable
- for partial (ajax) requests, return the contents of this variable
- for full-page requests, render the full page, which expands the value of
the context variable
Instead, avoid context variables let the controller simply render the full or partial page, and let
the full page template include the partial page.
Remove this context variable for templating and use render exclusively.
From templates, use %include instead of context variables.
This in line with the suggestions in the Pylons documentation:
http://pylons-webframework.readthedocs.org/en/latest/helpers.html#partial-updates-with-ajax
author | Thomas De Schampheleire <thomas.de_schampheleire@alcatel-lucent.com> |
---|---|
date | Sat, 21 Feb 2015 22:04:54 +0100 |
parents | 231160230379 |
children | 0c4f2c53ea4c |
line wrap: on
line source
List of contributors to Kallithea project: Marcin Kuźmiński <marcin@python-works.com> Lukasz Balcerzak <lukaszbalcerzak@gmail.com> Jason Harris <jason@jasonfharris.com> Thayne Harbaugh <thayne@fusionio.com> cejones <> Thomas Waldmann <tw-public@gmx.de> Lorenzo M. Catucci <lorenzo@sancho.ccd.uniroma2.it> Dmitri Kuznetsov <> Jared Bunting <jared.bunting@peachjean.com> Steve Romanow <slestak989@gmail.com> Augosto Hermann <augusto.herrmann@planejamento.gov.br> Ankit Solanki <ankit.solanki@gmail.com> Liad Shani <liadff@gmail.com> Les Peabody <lpeabody@gmail.com> Jonas Oberschweiber <jonas.oberschweiber@d-velop.de> Matt Zuba <matt.zuba@goodwillaz.org> Aras Pranckevicius <aras@unity3d.com> Tony Bussieres <t.bussieres@gmail.com> Erwin Kroon <e.kroon@smartmetersolutions.nl> nansenat16 <nansenat16@null.tw> Vincent Duvert <vincent@duvert.net> Takumi IINO <trot.thunder@gmail.com> Indra Talip <indra.talip@gmail.com> James Rhodes <jrhodes@redpointsoftware.com.au> Dominik Ruf <dominikruf@gmail.com> xpol <xpolife@gmail.com> Vincent Caron <vcaron@bearstech.com> Zachary Auclair <zach101@gmail.com> Stefan Engel <mail@engel-stefan.de> Andrew Shadura <andrew@shadura.me> Raoul Thill <raoul.thill@gmail.com> Philip Jameson <philip.j@hostdime.com> Mads Kiilerich <madski@unity3d.com> Dan Sheridan <djs@adelard.com> Dennis Brakhane <brakhane@googlemail.com> Simon Lopez <simon.lopez@slopez.org> Jonathan Sternberg <jonathansternberg@gmail.com> Grzegorz Rożniecki <xaerxess@gmail.com> Andrew Kesterson <andrew@aklabs.net> David A. Sjøen <david.sjoen@westcon.no> Jelmer Vernooij <jelmer@samba.org> larikale SteveCohen RhodeCode GmbH Sebastian Kreutzberger <sebastian@rhodecode.com> thomas <thomas@rhodecode.com> Bradley M. Kuhn <bkuhn@sfconservancy.org> Sean Farley <sean.michael.farley@gmail.com> Martin Vium <martinv@unity3d.com> Daniel Anderson <daniel@dattrix.com> Travis Burtrum <android@moparisthebest.com>