I'm using the Django built-in server for dev. On Sep 20, 3:15 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Sep 20, 3:53 pm, Dave Lowe <[EMAIL PROTECTED]> wrote: > > > > > I'm running into issues with theMEDIA_URLand that cursed trailing > > slash. Here's what the documentation says aboutMEDIA_URL: > > > "Note that this should have a trailing slash if it has a path > > component." Good examples given > > are:http://media.lawrence.comandhttp://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 thatMEDIA_URLin 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? > > What are you using as your development server? Are you using Django > inbuilt server or something else? > > Good web servers tend to be quite tolerant of repeating slashes and > will eliminate them before trying to match them. > > Graham
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---