Author: jezdez
Date: 2011-07-01 08:19:34 -0700 (Fri, 01 Jul 2011)
New Revision: 16492

Modified:
   django/branches/releases/1.3.X/docs/howto/deployment/modpython.txt
   django/branches/releases/1.3.X/docs/howto/deployment/modwsgi.txt
   django/branches/releases/1.3.X/docs/howto/static-files.txt
   django/branches/releases/1.3.X/docs/ref/contrib/admin/index.txt
Log:
[1.3.X] Fixed #15974 -- Correctly link to static files handling in deployment 
docs. Thanks, RogueBean.

Backport from trunk (r16491).

Modified: django/branches/releases/1.3.X/docs/howto/deployment/modpython.txt
===================================================================
--- django/branches/releases/1.3.X/docs/howto/deployment/modpython.txt  
2011-07-01 15:18:42 UTC (rev 16491)
+++ django/branches/releases/1.3.X/docs/howto/deployment/modpython.txt  
2011-07-01 15:19:34 UTC (rev 16492)
@@ -246,9 +246,9 @@
     * A stripped-down version of Apache_
     * Cherokee_
 
-If, however, you have no option but to serve media files on the same Apache
-``VirtualHost`` as Django, here's how you can turn off mod_python for a
-particular part of the site::
+If, however, you have no option but to serve media or static files on the
+same Apache ``VirtualHost`` as Django, here's how you can turn off mod_python
+for a particular part of the site::
 
     <Location "/media">
         SetHandler None
@@ -257,9 +257,9 @@
 Just change ``Location`` to the root URL of your media files. You can also use
 ``<LocationMatch>`` to match a regular expression.
 
-This example sets up Django at the site root but explicitly disables Django for
-the ``media`` subdirectory and any URL that ends with ``.jpg``, ``.gif`` or
-``.png``::
+This example sets up Django at the site root but explicitly disables Django
+for the ``media`` and ``static`` subdirectories and any URL that ends with
+``.jpg``, ``.gif`` or ``.png``::
 
     <Location "/">
         SetHandler python-program
@@ -271,11 +271,14 @@
         SetHandler None
     </Location>
 
+    <Location "/static">
+        SetHandler None
+    </Location>
+
     <LocationMatch "\.(jpg|gif|png)$">
         SetHandler None
     </LocationMatch>
 
-
 .. _lighttpd: http://www.lighttpd.net/
 .. _Nginx: http://wiki.nginx.org/Main
 .. _TUX: http://en.wikipedia.org/wiki/TUX_web_server
@@ -285,22 +288,21 @@
 Serving the admin files
 =======================
 
-Note that the Django development server automagically serves admin media files,
-but this is not the case when you use any other server arrangement. You're
-responsible for setting up Apache, or whichever media server you're using, to
-serve the admin files.
+Note that the Django development server automagically serves the static files
+of the admin app, but this is not the case when you use any other server
+arrangement. You're responsible for setting up Apache, or whichever media
+server you're using, to serve the admin files.
 
-The admin files live in (:file:`django/contrib/admin/media`) of the Django
-distribution.
+The admin files live in (:file:`django/contrib/admin/static/admin`) of the
+Django distribution.
 
-Here are two recommended approaches:
+We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle
+the admin files, but here are two other approaches:
 
-    1. Create a symbolic link to the admin media files from within your
-       document root. This way, all of your Django-related files -- code 
**and**
-       templates -- stay in one place, and you'll still be able to ``svn
-       update`` your code to get the latest admin templates, if they change.
+    1. Create a symbolic link to the admin static files from within your
+       document root.
 
-    2. Or, copy the admin media files so that they live within your Apache
+    2. Or, copy the admin static files so that they live within your Apache
        document root.
 
 Using "eggs" with mod_python

Modified: django/branches/releases/1.3.X/docs/howto/deployment/modwsgi.txt
===================================================================
--- django/branches/releases/1.3.X/docs/howto/deployment/modwsgi.txt    
2011-07-01 15:18:42 UTC (rev 16491)
+++ django/branches/releases/1.3.X/docs/howto/deployment/modwsgi.txt    
2011-07-01 15:19:34 UTC (rev 16492)
@@ -55,12 +55,12 @@
 replace 'mysite.settings' with your correct settings file, and 
'/path/to/mysite'
 with your own project's location.
 
-.. _serving-media-files:
+.. _serving-files:
 
-Serving media files
-===================
+Serving files
+=============
 
-Django doesn't serve media files itself; it leaves that job to whichever Web
+Django doesn't serve files itself; it leaves that job to whichever Web
 server you choose.
 
 We recommend using a separate Web server -- i.e., one that's not also running
@@ -76,22 +76,29 @@
 ``VirtualHost`` as Django, you can set up Apache to serve some URLs as
 static media, and others using the mod_wsgi interface to Django.
 
-This example sets up Django at the site root, but explicitly serves 
``robots.txt``,
-``favicon.ico``, any CSS file, and anything in the ``/media/`` URL space as a 
static
-file. All other URLs will be served using mod_wsgi::
+This example sets up Django at the site root, but explicitly serves
+``robots.txt``, ``favicon.ico``, any CSS file, and anything in the
+``/static/`` and ``/media/`` URL space as a static file. All other URLs
+will be served using mod_wsgi::
 
     Alias /robots.txt /usr/local/wsgi/static/robots.txt
     Alias /favicon.ico /usr/local/wsgi/static/favicon.ico
 
     AliasMatch ^/([^/]*\.css) /usr/local/wsgi/static/styles/$1
 
-    Alias /media/ /usr/local/wsgi/static/media/
+    Alias /media/ /usr/local/wsgi/media/
+    Alias /static/ /usr/local/wsgi/static/
 
     <Directory /usr/local/wsgi/static>
     Order deny,allow
     Allow from all
     </Directory>
 
+    <Directory /usr/local/wsgi/media>
+    Order deny,allow
+    Allow from all
+    </Directory>
+
     WSGIScriptAlias / /usr/local/wsgi/scripts/django.wsgi
 
     <Directory /usr/local/wsgi/scripts>
@@ -105,8 +112,8 @@
 .. _Apache: http://httpd.apache.org/
 .. _Cherokee: http://www.cherokee-project.com/
 
-More details on configuring a mod_wsgi site to serve static files can be found
-in the mod_wsgi documentation on `hosting static files`_.
+.. More details on configuring a mod_wsgi site to serve static files can be 
found
+.. in the mod_wsgi documentation on `hosting static files`_.
 
 .. _hosting static files: 
http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#Hosting_Of_Static_Files
 
@@ -115,22 +122,21 @@
 Serving the admin files
 =======================
 
-Note that the Django development server automagically serves admin media files,
-but this is not the case when you use any other server arrangement. You're
-responsible for setting up Apache, or whichever media server you're using, to
-serve the admin files.
+Note that the Django development server automagically serves the static files
+of the admin app, but this is not the case when you use any other server
+arrangement. You're responsible for setting up Apache, or whichever media
+server you're using, to serve the admin files.
 
-The admin files live in (:file:`django/contrib/admin/media`) of the Django
-distribution.
+The admin files live in (:file:`django/contrib/admin/static/admin`) of the
+Django distribution.
 
-Here are two recommended approaches:
+We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle
+the admin files, but here are two other approaches:
 
-    1. Create a symbolic link to the admin media files from within your
-       document root. This way, all of your Django-related files -- code 
**and**
-       templates -- stay in one place, and you'll still be able to ``svn
-       update`` your code to get the latest admin templates, if they change.
+    1. Create a symbolic link to the admin static files from within your
+       document root.
 
-    2. Or, copy the admin media files so that they live within your Apache
+    2. Or, copy the admin static files so that they live within your Apache
        document root.
 
 Details

Modified: django/branches/releases/1.3.X/docs/howto/static-files.txt
===================================================================
--- django/branches/releases/1.3.X/docs/howto/static-files.txt  2011-07-01 
15:18:42 UTC (rev 16491)
+++ django/branches/releases/1.3.X/docs/howto/static-files.txt  2011-07-01 
15:19:34 UTC (rev 16492)
@@ -337,7 +337,7 @@
     * On the server, run :djadmin:`collectstatic` to copy all the static files
       into :setting:`STATIC_ROOT`.
     * Point your web server at :setting:`STATIC_ROOT`. For example, here's
-      :ref:`how to do this under Apache and mod_wsgi <serving-media-files>`.
+      :ref:`how to do this under Apache and mod_wsgi <serving-files>`.
 
 You'll probably want to automate this process, especially if you've got
 multiple web servers. There's any number of ways to do this automation, but

Modified: django/branches/releases/1.3.X/docs/ref/contrib/admin/index.txt
===================================================================
--- django/branches/releases/1.3.X/docs/ref/contrib/admin/index.txt     
2011-07-01 15:18:42 UTC (rev 16491)
+++ django/branches/releases/1.3.X/docs/ref/contrib/admin/index.txt     
2011-07-01 15:19:34 UTC (rev 16492)
@@ -46,8 +46,8 @@
 
 .. seealso::
 
-    For information about serving the media files (images, JavaScript, and CSS)
-    associated with the admin in production, see :ref:`serving-media-files`.
+    For information about serving the static files (images, JavaScript, and
+    CSS) associated with the admin in production, see :ref:`serving-files`.
 
 ``ModelAdmin`` objects
 ======================

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to