You can create a custom context processor that fetches the base media
url from your settings file and makes it available to the templates.

Check this out:
http://www.b-list.org/weblog/2006/06/14/django-tips-template-context-processors


On Apr 4, 11:02 am, "akonsu" <[EMAIL PROTECTED]> wrote:
> hello,
>
> i need a way to emit media url in a template. something similar to the
> {% url %} tag but for media. curently django site itself is in
> violation of the DRY principle:
>
> http://code.djangoproject.com/browser/djangoproject.com/django_websit...
> (line 18 for example)
>
> i guess i need a custom tag for that. or am i missing something?
>
> thanks
> konstantin


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

Reply via email to