(in this tag, MEDIA_URL is in the settings file and contains the URL
prefix.. so I would go something liike
{% load media %}
{% media_prefix %}css/myfunkystyle.css
this is basically the admin_media templatetag but using a different setting.
--0<---
from django.core import template
class MediaPrefixNode(template.Node):
def render(self, context):
try:
from django.conf.settings import MEDIA_URL
except ImportError:
return ''
return MEDIA_URL
def media_prefix(parser, token):
"""
{% media_prefix %}
"""
return MediaPrefixNode()
template.register_tag('media_prefix', media_prefix)
--
I...@Holsman.net -- ++61-3-9877-0909
If everything seems under control, you're not going fast enough. -
Mario Andretti