summaryrefslogtreecommitdiff
path: root/django/contrib/staticfiles/management
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-11-17 15:36:26 +0000
committerJannis Leidel <jannis@leidel.info>2010-11-17 15:36:26 +0000
commit33d8fcde8a317184a627492f008a4eab9333ed88 (patch)
tree7c877854327c83aefdfaf00e727d26bd766e519e /django/contrib/staticfiles/management
parent9b45f6cd5444423693715cc2a04d91a0de75060b (diff)
Fixed #14693, #14709 -- Backwards incompatible change to rectify the confusion around the STATICFILES_URL and STATICFILES_ROOT settings.
* Two new global settings that will be used by -- **but are not limited to** -- the staticfiles app: STATIC_ROOT and STATIC_URL. * Moving the 'django.contrib.staticfiles.templatetags.staticfiles' template tag to the core ('django.templatetags.static') and renaming it to 'get_static_prefix'. * Moving the context processor 'django.contrib.staticfiles.context_processors.staticfiles' to the core ('django.core.context_processors.static') and renaming it to 'static'. * Paths in media definitions will use STATIC_URL as the prefix if the value is not None, and falls back to the previously used MEDIA_URL. Thanks again to the community for constructive criticism and Carl and Russ for sanity-inducing discussions on IRC. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/staticfiles/management')
-rw-r--r--django/contrib/staticfiles/management/commands/collectstatic.py4
-rw-r--r--django/contrib/staticfiles/management/commands/runserver.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/staticfiles/management/commands/collectstatic.py b/django/contrib/staticfiles/management/commands/collectstatic.py
index d121223595..8882ae20db 100644
--- a/django/contrib/staticfiles/management/commands/collectstatic.py
+++ b/django/contrib/staticfiles/management/commands/collectstatic.py
@@ -12,7 +12,7 @@ from django.contrib.staticfiles import finders
class Command(NoArgsCommand):
"""
Command that allows to copy or symlink media files from different
- locations to the settings.STATICFILES_ROOT.
+ locations to the settings.STATIC_ROOT.
"""
option_list = NoArgsCommand.option_list + (
make_option('--noinput', action='store_false', dest='interactive',
@@ -85,7 +85,7 @@ Type 'yes' to continue, or 'no' to cancel: """)
self.stdout.write("\n%s static file%s %s to '%s'%s.\n"
% (actual_count, actual_count != 1 and 's' or '',
symlink and 'symlinked' or 'copied',
- settings.STATICFILES_ROOT,
+ settings.STATIC_ROOT,
unmodified_count and ' (%s unmodified)'
% unmodified_count or ''))
diff --git a/django/contrib/staticfiles/management/commands/runserver.py b/django/contrib/staticfiles/management/commands/runserver.py
index e13875994b..f4c22598c3 100644
--- a/django/contrib/staticfiles/management/commands/runserver.py
+++ b/django/contrib/staticfiles/management/commands/runserver.py
@@ -8,7 +8,7 @@ from django.contrib.staticfiles.handlers import StaticFilesHandler
class Command(BaseRunserverCommand):
option_list = BaseRunserverCommand.option_list + (
make_option('--nostatic', action="store_false", dest='use_static_handler', default=True,
- help='Tells Django to NOT automatically serve static files at STATICFILES_URL.'),
+ help='Tells Django to NOT automatically serve static files at STATIC_URL.'),
make_option('--insecure', action="store_true", dest='insecure_serving', default=False,
help='Allows serving static files even if DEBUG is False.'),
)