Ticket #1278: 1278.diff
File 1278.diff, 2.8 KB (added by , 18 years ago) |
---|
-
django/conf/global_settings.py
138 138 'django.core.context_processors.auth', 139 139 'django.core.context_processors.debug', 140 140 'django.core.context_processors.i18n', 141 'django.core.context_processors.media', 141 142 # 'django.core.context_processors.request', 142 143 ) 143 144 -
django/core/context_processors.py
42 42 43 43 return context_extras 44 44 45 def media(request): 46 """ 47 Adds context variables for the admin media prefix and the base 48 media URL. 49 50 """ 51 return {'ADMIN_MEDIA_PREFIX': settings.ADMIN_MEDIA_PREFIX, 52 'MEDIA_URL': settings.MEDIA_URL } 53 45 54 def request(request): 46 55 return {'request': request} 47 56 -
docs/settings.txt
718 718 719 719 ("django.core.context_processors.auth", 720 720 "django.core.context_processors.debug", 721 "django.core.context_processors.i18n") 721 "django.core.context_processors.i18n", 722 "django.core.context_processors.media") 722 723 723 724 A tuple of callables that are used to populate the context in ``RequestContext``. 724 725 These callables take a request object as their argument and return a dictionary -
docs/templates_python.txt
291 291 292 292 ("django.core.context_processors.auth", 293 293 "django.core.context_processors.debug", 294 "django.core.context_processors.i18n") 294 "django.core.context_processors.i18n", 295 "django.core.context_processors.media") 295 296 296 297 Each processor is applied in order. That means, if one processor adds a 297 298 variable to the context and a second processor adds a variable with the same … … 387 388 .. _LANGUAGE_CODE setting: ../settings/#language-code 388 389 .. _internationalization docs: ../i18n/ 389 390 391 django.core.context_processors.media 392 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 393 394 If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processors, every 395 ``RequestContext`` will contain these two variables: 396 397 * ``ADMIN_MEDIA_PREFIX`` -- The value of the `ADMIN_MEDIA_PREFIX setting`_. 398 * ``MEDIA_URL`` -- The value of the `MEDIA_URL setting`_. 399 400 .. _ADMIN_MEDIA_PREFIX setting: ../settings/#admin-media-prefix 401 .. _MEDIA_URL setting: ../settings/#media-url 402 390 403 django.core.context_processors.request 391 404 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 392 405