views:

54

answers:

2

Hi, Im using a flash gallery and the settings xml file is stored in /media/xml/gallery.xml

In the gallery.xml file I want to add this snippet of code:

<items>
    {% for image in images %}
    <item source="{{ MEDIA_URL }}{{ image.image }}" thumb="" description="{{ image.title }}" />
    {% endfor %}
</item>

But the source="... renders as such: http://127.0.0.1:8000/media/images/gallery/%7B%7B%20MEDIA_URL%20%7D%7D%7B%7B%20image.image%20%7D%7D

Is there a way I can work around this problem? Thanks for the help.

+2  A: 

You will have to serve this document via a Django view, and render it as a template.

Daniel Roseman
+2  A: 

Static media is, by definition, static. If you want Django mechanisms to work then you need to process using Django.

Ignacio Vazquez-Abrams