1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

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
This commit is contained in:
Jannis Leidel
2010-10-20 01:33:24 +00:00
parent a014ee0288
commit cfc19f84de
54 changed files with 2008 additions and 313 deletions

View File

@@ -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}