mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
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
This commit is contained in:
@@ -59,7 +59,7 @@ In previous versions of Django, it was common to place static assets in
|
||||
app is to make it easier to keep static files separate from user-uploaded
|
||||
files. For this reason, you will probably want to make your
|
||||
:setting:`MEDIA_ROOT` and :setting:`MEDIA_URL` different from your
|
||||
:setting:`STATICFILES_ROOT` and :setting:`STATICFILES_URL`. You will need to
|
||||
:setting:`STATIC_ROOT` and :setting:`STATIC_URL`. You will need to
|
||||
arrange for serving of files in :setting:`MEDIA_ROOT` yourself;
|
||||
``staticfiles`` does not deal with user-uploaded media at all.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user