On 12/19/06, cwurld <[EMAIL PROTECTED]> wrote:
It seems like I am really missing something here. But based on all the other questions on css, it seems like many others are just as confused as I am.
CSS files, JavaScript files, images, audio, video and other things which are just "files" to be sent as-is are generally referred to as "static files" or "media files". There's nothing special about how Django treats them, but it is highly recommended that you use two completely separate web server instances (where by "separate instances" I mean completely different -- different config files, and running on different ports or even on different domains): one handling the Django parts of the site (dynamic) and the other handling the static or media files. The reason for this is efficiency; if you are, for example, running Django under mod_python on Apache, each Apache process has to have all of the following *in memory* at all times: 1. mod_python and associated Python processing code. 2. Django. 3. Your application. It would be extremely wasteful to have a process like this, which has all these useful things in memory, just sit around and serve CSS or images straight off the disk; whenever that happens, you're both A) wasting memory because all that overhead isn't needed just to serve a stylesheet and B) wasting a process which could be serving a dynamically-generated page, which means you may run into a bottleneck when you hit the limit of available Apache processes. So we generally recommend using a separate instance of Apache (with no mod_python) or some other web server (lighttpd is very good at this) to handle serving static CSS files, JavaScript, images, etc.; the result is *much* more efficient use of your available resources. -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---