On 8/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> is it possible to get the value of MEDIA_URL from settings.py in the 
> templates ?

You can write a template context processor, and use the
`RequestContext` subclass of the normal Context.

See the official documentation (and list of built-in context processors) here:
http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext

I've also written a tutorial which explains this in more detail, and
actually uses MEDIA_URL as the example:
http://www.b-list.org/weblog/2006/06/14/django-tips-template-context-processors

-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to