Re: Insert variable into RequestContext?

2013-05-06 Thread bruno desthuilliers
Looks like you want a context_processor : 
https://docs.djangoproject.com/en/1.5/ref/templates/api/#subclassing-context-requestcontext

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Insert variable into RequestContext?

2013-05-03 Thread Mike Doroshenko II

Hi all,

I want to make all the pages for my project state whether it's running 
on my live server or a backup server and am already using RequestContext 
for all my views that call my templates. I was thinking I would write 
some code that uses if statements against the hostname to add a variable 
I can use in my templates to RequestContext.


Is it possible to do this? Or maybe would a template tag be better?

MD2

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.