James,

Thank you for your replies.

> settings.MEDIA_URL contains info on this; if you're worried about that
> use it to build up the links (e.g., write a templatetag that pulls it
> in, or a context processor that puts it in the template context.

I had thought of doing this, but after not seeing it in anyone elses
code, I wasnt sure if:
a) it was the "right thing to do". b) how to do it properly.

> It's not that "media" and "structure" are separated, it's that with
> Apache/mod_python it's better for performance reasons to use a
> separate web server for media files, stylesheets and JavaScript unless
> those files are being constructed by Django; why incur the overhead of
> a process with Django and your app in memory just to read a file off
> disk and send it down the pipe?
> ......
> Of course, with other server arrangements this is less of a problem;
> my personal blog, for example, runs under lighttpd/FastCGI, so the
> same lighttpd instance serves all requests and has rewrites in place
> to ensure that the FastCGI listeners get any requests which require
> Django.

I definitely agree with you here. Is the same thing possible with
mod_python and "SetHandler None"  in the httpd.conf?

I also forgot to mention that lately I have been thinking, and would
appreciate your and other's opinions/thoughts/flames, so here goes:

* There are 2 kinds of media; content media and presentation media.

E.g.

   stylesheets, icons, backgrounds, etc. ==  presentation media.

   photos, videos, mp3's, pdfs, etc. == content media


* Certainly it is no problem to have the content media served
separately as it is not at all coupled to the application.

* But presentation media on the other hand, I see it as an integral
part of an application (templates also) and whilst I agree with it not
being served by django / mod_python / whatever, I dont see the sense in
it being anywhere else but inside the applications folder.

I.e.

./MyDjangoProject/

    ./MyDjangoApp/

        ./templates/

        ./css/

        ./js/

        ./img/

(remember: im not saying to put content in here, just elements that are
required for the app to function the way it was designed)


What do you guys think?

Cheers,


ChrisW


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

Reply via email to