mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #1278 -- Added a context processor that puts MEDIA_URL in the context, and added that context processor to the default set. Thanks to Ubernostrum for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -42,6 +42,13 @@ def i18n(request):
|
||||
|
||||
return context_extras
|
||||
|
||||
def media(request):
|
||||
"""
|
||||
Adds media-related context variables to the context.
|
||||
|
||||
"""
|
||||
return {'MEDIA_URL': settings.MEDIA_URL}
|
||||
|
||||
def request(request):
|
||||
return {'request': request}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user