From cfc19f84def07fb950ae8789ed0655eae4f66a92 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Wed, 20 Oct 2010 01:33:24 +0000 Subject: 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 --- django/core/context_processors.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'django/core/context_processors.py') 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} -- cgit v1.3