diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-06-30 09:06:19 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-06-30 09:06:19 +0000 |
| commit | 38a2444277a84eb6b74425f0e324d1dceb7d2ef1 (patch) | |
| tree | 1bfffc0cc808a57c1250c6e7e2986f8ba721fd9c /django/conf | |
| parent | 89e0e8b6bc861bb95e55bd5e255e756fe3be1cf2 (diff) | |
Fixed #16050 -- BACKWARDS-INCOMPATIBLE CHANGE: Moved static files of the admin to conventional file system location.
This also removes the need for ADMIN_MEDIA_PREFIX and replaces it with the convention to find admin's static files at STATIC_URL + 'admin/'.
Thanks to Jacob for the review and general help.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/conf')
| -rw-r--r-- | django/conf/__init__.py | 5 | ||||
| -rw-r--r-- | django/conf/global_settings.py | 5 | ||||
| -rw-r--r-- | django/conf/project_template/settings.py | 5 |
3 files changed, 4 insertions, 11 deletions
diff --git a/django/conf/__init__.py b/django/conf/__init__.py index c99b307c6d..4337bd4c11 100644 --- a/django/conf/__init__.py +++ b/django/conf/__init__.py @@ -68,8 +68,11 @@ class BaseSettings(object): """ def __setattr__(self, name, value): if name in ("MEDIA_URL", "STATIC_URL") and value and not value.endswith('/'): - warnings.warn('If set, %s must end with a slash' % name, + warnings.warn("If set, %s must end with a slash" % name, DeprecationWarning) + elif name == "ADMIN_MEDIA_PREFIX": + warnings.warn("The ADMIN_MEDIA_PREFIX setting has been removed; " + "use STATIC_URL instead.", DeprecationWarning) object.__setattr__(self, name, value) diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index fedea55bac..5ee12d715f 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -593,8 +593,3 @@ STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.AppDirectoriesFinder', # 'django.contrib.staticfiles.finders.DefaultStorageFinder', ) - -# URL prefix for admin media -- CSS, JavaScript and images. -# Make sure to use a trailing slash. -# Examples: "http://foo.com/static/admin/", "/static/admin/". -ADMIN_MEDIA_PREFIX = '/static/admin/' diff --git a/django/conf/project_template/settings.py b/django/conf/project_template/settings.py index 794522b202..3a2243fbc6 100644 --- a/django/conf/project_template/settings.py +++ b/django/conf/project_template/settings.py @@ -62,11 +62,6 @@ STATIC_ROOT = '' # Example: "http://media.lawrence.com/static/" STATIC_URL = '/static/' -# URL prefix for admin static files -- CSS, JavaScript and images. -# Make sure to use a trailing slash. -# Examples: "http://foo.com/static/admin/", "/static/admin/". -ADMIN_MEDIA_PREFIX = '/static/admin/' - # Additional locations of static files STATICFILES_DIRS = ( # Put strings here, like "/home/html/static" or "C:/www/django/static". |
