Django

Code

Changeset 1124

Show
Ignore:
Timestamp:
11/07/05 08:47:29 (3 years ago)
Author:
adrian
Message:

Added 'Serving the admin files' section in docs/modpython.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/modpython.txt

    r1123 r1124  
    33================================= 
    44 
    5 `Apache`_ with `mod_python`_ currently is the preferred setup for using Django 
     5Apache_ with `mod_python`_ currently is the preferred setup for using Django 
    66on a production server. 
    77 
     
    113113=================== 
    114114 
    115 Django doesn't serve media files itself. It'd be inefficient to flow media 
    116 files through a (relatively) complex framework when much, much more well-tuned 
    117 solutions are better. 
     115Django doesn't serve media files itself; it leaves that job to whichever Web 
     116server you choose. 
    118117 
    119 We recommend using a separate Web server for serving media. Here are some good 
    120 choices: 
     118We recommend using a separate Web server -- i.e., one that's not also running 
     119Django -- for serving media. Here are some good choices: 
    121120 
    122121* lighttpd_ 
     
    153152    </Location> 
    154153 
    155 Note that the Django development server automagically serves admin media files, 
    156 but this is not the case when you use any other server arrangement. 
    157154 
    158155.. _lighttpd: http://www.lighttpd.net/ 
    159156.. _TUX: http://en.wikipedia.org/wiki/TUX_web_server 
    160157.. _Apache: http://httpd.apache.org/ 
     158 
     159Serving the admin files 
     160======================= 
     161 
     162Note that the Django development server automagically serves admin media files, 
     163but this is not the case when you use any other server arrangement. You're 
     164responsible for setting up Apache, or whichever media server you're using, to 
     165serve the admin files. 
     166 
     167The admin files live in (``django/contrib/admin/media``) of the Django 
     168distribution. 
     169 
     170Here are two recommended approaches: 
     171 
     172    1. Create a symbolic link to the admin media files from within your 
     173       document root. This way, all of your Django-related files -- code 
     174       **and** templates -- stay in one place, and you'll still be able to 
     175       ``svn update`` your code to get the latest admin templates, if they 
     176       change. 
     177    2. Or, copy the admin media files so that they live within your document 
     178       root.