After I set a session object, how can I access the value of the given object in my templates?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
{{request.session.variable}}
RequestContext will give you access to request object in templates.
You’ll have to add this to your settings.py:
And to hook up RequestContext to templates you can use this idiom in the view function: