I'm running into issues with the MEDIA_URL and that cursed trailing
slash. Here's what the documentation says about MEDIA_URL:

"Note that this should have a trailing slash if it has a path
component." Good examples given are: http://media.lawrence.com and
http://www.example.com/static/

I've found recently that my get_IMAGE_FIELD_url() methods don't work
correctly if that trailing slash isn't there unless it's a domain like
in the first example. But it's problematic for every situation where
I'm trying to use that MEDIA_URL in a template, like this:

<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/css/
master.css" />

On my production server, the media is served from a subdomain so this
works great. But on my development server, it's served from a path
like in the second example above. So what I'm getting suddenly is a
broken pipe (32) because there are two slashes in a row (http://
www.example.com/static//css/master.css). I'm pretty sure that in the
past I've gotten around this before by simply omitting the trailing
slash, which fixes this but breaks the get_url() methods.

I have the feeling I'm missing something. What does everyone else do
to get around this?


--~--~---------~--~----~------------~-------~--~----~
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