Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed some documentation and default-settings.py comments that were m…

…isleading about the purpose of STATIC_ROOT, and removed an unused import.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15384 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 76fb2bb0e246884ce6dc1a48d0db55e0673de8e0 1 parent 9a82eb6
Carl Meyer authored
16  django/conf/project_template/settings.py
@@ -52,21 +52,27 @@
52 52
 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
53 53
 MEDIA_URL = ''
54 54
 
55  
-# Absolute path to the directory that holds static files.
  55
+# Absolute path to the directory static files should be collected to.
  56
+# Don't put anything in this directory yourself; store your static files
  57
+# in apps' "static/" subdirectories and in STATICFILES_DIRS.
56 58
 # Example: "/home/media/media.lawrence.com/static/"
57 59
 STATIC_ROOT = ''
58 60
 
59  
-# URL that handles the static files served from STATIC_ROOT.
  61
+# URL prefix for static files.
60 62
 # Example: "http://media.lawrence.com/static/"
61 63
 STATIC_URL = '/static/'
62 64
 
63  
-# URL prefix for admin media -- CSS, JavaScript and images.
  65
+# URL prefix for admin static files -- CSS, JavaScript and images.
64 66
 # Make sure to use a trailing slash.
65 67
 # Examples: "http://foo.com/static/admin/", "/static/admin/".
66 68
 ADMIN_MEDIA_PREFIX = '/static/admin/'
67 69
 
68  
-# A list of locations of additional static files
69  
-STATICFILES_DIRS = ()
  70
+# Additional locations of static files
  71
+STATICFILES_DIRS = (
  72
+    # Put strings here, like "/home/html/static" or "C:/www/django/static".
  73
+    # Always use forward slashes, even on Windows.
  74
+    # Don't forget to use absolute paths, not relative paths.
  75
+    )
70 76
 
71 77
 # List of finder classes that know how to find static files in
72 78
 # various locations.
1  django/contrib/staticfiles/finders.py
... ...
@@ -1,6 +1,5 @@
1 1
 import os
2 2
 from django.conf import settings
3  
-from django.db import models
4 3
 from django.core.exceptions import ImproperlyConfigured
5 4
 from django.core.files.storage import default_storage, Storage, FileSystemStorage
6 5
 from django.utils.datastructures import SortedDict
2  docs/ref/contrib/staticfiles.txt
@@ -26,8 +26,6 @@ Settings
26 26
 .. note::
27 27
 
28 28
     The following settings control the behavior of the staticfiles app.
29  
-    Configuring the global settings :setting:`STATIC_ROOT` and
30  
-    :setting:`STATIC_URL` is **required**.
31 29
 
32 30
 .. setting:: STATICFILES_DIRS
33 31
 
24  docs/ref/settings.txt
@@ -1628,22 +1628,24 @@ STATIC_ROOT
1628 1628
 
1629 1629
 Default: ``''`` (Empty string)
1630 1630
 
1631  
-The absolute path to the directory that contains static files.
  1631
+The absolute path to the directory where :djadmin:`collectstatic` will collect
  1632
+static files for deployment.
1632 1633
 
1633 1634
 Example: ``"/home/example.com/static/"``
1634 1635
 
1635 1636
 If the :doc:`staticfiles</ref/contrib/staticfiles>` contrib app is enabled
1636  
-(default) this will be used as the directory which the
1637  
-:djadmin:`collectstatic` management command collects static files in. See
1638  
-the howto on :doc:`managing static files</howto/static-files>` for more
1639  
-details about usage.
1640  
-
1641  
-.. warning:: This is not a place to store your static files permanently;
1642  
-    you should do that in directories that will be found by
1643  
-    :doc:`staticfiles</ref/contrib/staticfiles>`'s
  1637
+(default) the :djadmin:`collectstatic` management command will collect static
  1638
+files into this directory. See the howto on :doc:`managing static
  1639
+files</howto/static-files>` for more details about usage.
  1640
+
  1641
+.. warning:: This should be an (initially empty) destination directory for
  1642
+    collecting your static files from their permanent locations into one
  1643
+    directory for ease of deployment; it is **not** a place to store your
  1644
+    static files permanently. You should do that in directories that will be
  1645
+    found by :doc:`staticfiles</ref/contrib/staticfiles>`'s
1644 1646
     :setting:`finders<STATICFILES_FINDERS>`, which by default, are
1645  
-    ``'static'`` app sub directories and any directories you include in
1646  
-    the :setting:`STATICFILES_DIRS`).
  1647
+    ``'static/'`` app sub-directories and any directories you include in
  1648
+    :setting:`STATICFILES_DIRS`).
1647 1649
 
1648 1650
 See :doc:`staticfiles reference</ref/contrib/staticfiles>` and
1649 1651
 :setting:`STATIC_URL`.

0 notes on commit 76fb2bb

Please sign in to comment.
Something went wrong with that request. Please try again.