FAQ
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+unsubscribe@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.

Search Discussions

  • Bruno desthuilliers at May 6, 2013 at 12:06 pm
    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+unsubscribe@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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdjango-users @
categoriesdjango, python
postedMay 4, '13 at 3:47a
activeMay 6, '13 at 12:06p
posts2
users2
websitedjangoproject.com

People

Translate

site design / logo © 2021 Grokbase