On Mon, 2007-05-28 at 22:02 +0800, Russell Keith-Magee wrote:
> On 5/28/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> >
> > On Mon, 2007-05-28 at 19:31 +0800, Russell Keith-Magee wrote:
[...]
> > >
> > > When you say JS and CSS are separate - how separate are they? What
> > > relationship (if any) does the path to CSS and JS have with MEDIA_URL
> > > and MEDIA_ROOT? Can you describe the 'worst case' URL space that Media
> > > objects would need to be able to target?
> >
> > One "worst case" is using the Yahoo UI library and having the URLs for
> > the Javascript components point to Yahoo's external hosting. Which is
> > recommended practice (huge caching benefits).
> 
> Granted.
> 
> > What is you problem with Ivan's suggestion of not munging absolute URLs?
> 
> I have a bit of a Pavlovian response to the suggestion of output
> behaviour that varies depending on the exact magic format of the
> input.

I normally do, too. However, in this case, I think it's valid (and good)
to differentiate between absolute URLs, which stand on their own
completely, and merely full paths (without scheme or hostname
components) or other types of relative URLs, which may or may not need
munging.

This is not something that's isolated to the media thing you're talking
about. We have a few "absolute URL" bugs in various places
(HttpResponseRedirect being the big example, syndication being another
area) and handling those smoothly is something I've been thinking about.


>  However, that said, I'm not completely opposed, and I can't
> think of an obvious better solution. I mostly just want to make sure
> that I fully understand Ivan's use cases, so we can make sure that
> there isn't a better solution lurking around.

Fair enough. Personally, I feel that in most places Django handles URL
construction, it should be watching out for absolute URLs and not
damaging them and that's not always happening. So this particular
discussion isn't an isolated case; it's more tip-of-the-iceberg stuff.
It's something I'll smooth out as a side project before 1.0; we can do
it little bits at a time without any real disruption.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to