diff options
| author | Jannis Leidel <jannis@leidel.info> | 2010-10-20 01:33:24 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2010-10-20 01:33:24 +0000 |
| commit | cfc19f84def07fb950ae8789ed0655eae4f66a92 (patch) | |
| tree | 2c02cc5996a28f0ab900def5d804c961753c86d0 /django/core/context_processors.py | |
| parent | a014ee02888d2fcea6880bef51f143632a60aab3 (diff) | |
Fixed #12323 and #11582 -- Extended the ability to handle static files. Thanks to all for helping with the original app, the patch, documentation and general support.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/context_processors.py')
| -rw-r--r-- | django/core/context_processors.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/django/core/context_processors.py b/django/core/context_processors.py index 7a59728bfc..a529c612aa 100644 --- a/django/core/context_processors.py +++ b/django/core/context_processors.py @@ -71,7 +71,15 @@ def media(request): Adds media-related context variables to the context. """ - return {'MEDIA_URL': settings.MEDIA_URL} + import warnings + warnings.warn( + "The context processor at `django.core.context_processors.media` is " \ + "deprecated; use the path `django.contrib.staticfiles.context_processors.staticfiles` " \ + "instead.", + PendingDeprecationWarning + ) + from django.contrib.staticfiles.context_processors import staticfiles as staticfiles_context_processor + return staticfiles_context_processor(request) def request(request): return {'request': request} |
