First thanks all of you for the quick reply!

On Sep 16, 4:10 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Wiadomość napisana w dniu 2008-09-16, o godz. 10:02, przez est:
>
>
>
>
>
>
>
> > Today, my boss came to me and asked: "Please move our django site from
> >http://xxx.com/tohttp://xxx.com/v2/";
>
> > It's killing me. Just image how huge mount of HTML source code to
> > modify.
>
> > I STRONGLY suggest django implement a 'project url' like asp.net, say
>
> > <link rel="stylesheet" href="~/main.css" type="text/css"
> > media="screen" />
>
> > where ~ always points to the current django project's top URL path.
>
> > This little feature will not slow down django template rendering,
> > right?
>
> Why bother? Use only paths in urls, either absolute and relative and  
> you are set. This way root (/) is not domain dependent (use sites  
> framework for settings domain name).
>
> --
> We read Knuth so you don't have to. - Tim Peters
>
> Jarek Zgoda, R&D, Redefine
> [EMAIL PROTECTED] Hide quoted text -
>
> - Show quoted text -


no, it's not THAT simple.

Image a base.html as a master template, in <head> there's

<link rel="stylesheet" href="/assets/main.css" type="text/css"
media="screen" />

I have to use absolute URL because http://xxx.com/ and http://xxx.com/news/
both inherit from this base.html, and together they share
http://xxx.com/assets/main.css

Now the problem is, how can I massively move all template under a new
sub-directory URL like http://xxx.com/v2/ ?




On Sep 16, 4:13 pm, "Tim Kersten" <[EMAIL PROTECTED]> wrote:
> Isn't that what MEDIA_URL is for? At least for your images and css
> resources. And as for the rest of the urls... urls.py?
>
> Tim ^,^
>
>
>
> On Tue, Sep 16, 2008 at 9:02 AM, est <[EMAIL PROTECTED]> wrote:
>
> > Today, my boss came to me and asked: "Please move our django site from
> >http://xxx.com/tohttp://xxx.com/v2/";
>
> > It's killing me. Just image how huge mount of HTML source code to
> > modify.
>
> > I STRONGLY suggest django implement a 'project url' like asp.net, say
>
> > <link rel="stylesheet" href="~/main.css" type="text/css"
> > media="screen" />
>
> > where ~ always points to the current django project's top URL path.
>
> > This little feature will not slow down django template rendering,
> > right?- Hide quoted text -
>
> - Show quoted text -

I think MEDIA_URL is used in views to handle forms or uploaded files,
not in templates





On Sep 16, 4:16 pm, "Tim Kersten" <[EMAIL PROTECTED]> wrote:
> The domain isn't changing. It's just the path, so links that use
> absolute paths will break. In a way I get it - using relative urls is
> easy to break something if you need to move it. Also copy & paste
> becomes hard. Perhaps an APPNAME_URL in your request context would
> help?
>
> Tim ^,^
>
> 2008/9/16 Jarek Zgoda <[EMAIL PROTECTED]>:
>
>
>
>
>
> > Wiadomość napisana w dniu 2008-09-16, o godz. 10:02, przez est:
>
> >> Today, my boss came to me and asked: "Please move our django site from
> >>http://xxx.com/tohttp://xxx.com/v2/";
>
> >> It's killing me. Just image how huge mount of HTML source code to
> >> modify.
>
> >> I STRONGLY suggest django implement a 'project url' like asp.net, say
>
> >> <link rel="stylesheet" href="~/main.css" type="text/css"
> >> media="screen" />
>
> >> where ~ always points to the current django project's top URL path.
>
> >> This little feature will not slow down django template rendering,
> >> right?
>
> > Why bother? Use only paths in urls, either absolute and relative and
> > you are set. This way root (/) is not domain dependent (use sites
> > framework for settings domain name).
>
> > --
> > We read Knuth so you don't have to. - Tim Peters
>
> > Jarek Zgoda, R&D, Redefine
> > [EMAIL PROTECTED] Hide quoted text -
>
> - Show quoted text -

What is APPNAME_URL anyway? I googled but get not results :-P
--~--~---------~--~----~------------~-------~--~----~
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