Surely you don't need to have the entire absolute URL - an sbsolute URL can be defined by just ensuring a preceeding forward slash appears in your paths - for example:
<img src="images/stuff.png"> should change to: <img src="/images/stuff.png"> This will cause the resource to be referenced from the root of your domain. Alternatively, you can use a BASE tag in the head of your HTML to set a a full or partial base path to preceed all relative resources. Hope that helps. -Phil On 17/05/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > My templates refer to CSS and images with absolute URL. I > cannot serve them with relative URLs, like I used to do in PHP > with: > <img src="images/stuff.png"> > (or can I? If so please let me know). > > This is fine until the moment I put my work on production > server, where I need to update all static URLs (from > http://localhost:8080/media/... to > http://www.mystuff.com/media/...). > > I came across a few posts dealing about static files and URLs, > usually ending up with some kind of request for a 'website > root URL' tag in templates. > > Does such a thing exist in Django (without creating custom tag)? > Are there any works in progress? > More generally, what are the best practices for not having to > substitute all media URLs in my templates (without serving the > same files for dev and prod) ? > > Thanks. > > Accédez au courrier électronique de La Poste : www.laposte.net ; > 3615 LAPOSTENET (0,34 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn) > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---