Am Mittwoch, den 11.07.2007, 13:34 -0400 schrieb Simon Drabble: > On Wed, 11 Jul 2007, Martin Kaffanke wrote: > > > Am Mittwoch, den 11.07.2007, 12:26 -0400 schrieb Simon Drabble: > >> On Wed, 11 Jul 2007, Martin Kaffanke wrote: > >> > >>> Hi there! > >>> > >>> How can I configure django to put the session (request.session) in all > >>> templates? > >>> > >>> I want to put a 'Hello Username' for logged in Users, and I want to do a > >>> dynamic login/logout button into the menu, depends on if there is a > >>> logged in user or not. > >>> > >>> Thanks, > >>> Martin > >>> > >> > >> Extend your templates from a common base, with the session info in the > >> base. > > > > Hum, I do not really understand what you mean... any links? > > > > Thanks, > > Martin > > > > Start here: > > http://www.djangoproject.com/documentation/templates/ > > Particularly: > > http://www.djangoproject.com/documentation/templates/#extends
Ok, I knew this already, but I think my problem is a bit different. At the moment I use on some places a {'session': request.session} for the Context to render the template. How Can I make the session automaticaly available in the base template, without having to be aware that I don't forgett this parameter for the Context? Thanks, Martin
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil