Wednesday, September 1, 2010

Re: static files

On 08/30/2010 09:26 PM, Bradley Hintze wrote:
> base.html
> ...
>
> <table align = "center">
> <tr><td><img src = "media/ajax-loader.gif">

That "media/xyz.gif" means that if you've got a
http://example.com/subdir/test.html page, the image looked up is
http://example.com/subdir/media/ajax-loader.gif

You probably want "/media/ajax-loader.gif".

And: you're apparently not using {{ MEDIA_URL }} in your template, which
is intended precisely to get the url right (and absolute).


Reinout

--
Reinout van Rees - reinout@vanrees.org - http://reinout.vanrees.org
Collega's gezocht!
Django/python vacature in Utrecht: http://tinyurl.com/35v34f9

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment