Changes between Version 4 and Version 5 of CookBookUsingExternalMedia
- Timestamp:
- Nov 30, 2009, 9:12:35 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookUsingExternalMedia
v4 v5 25 25 26 26 {{{ 27 #!python 27 28 "django.core.context_processors.media", 28 29 }}} 29 30 30 But if you are still on django 0.96:31 If you are still on django 0.96: 31 32 32 33 Here's a example snippet from a context process: 33 34 34 35 {{{ 36 #!python 35 37 from django.conf import settings 36 38 … … 40 42 41 43 Then in the settings.py under TEMPLATE_CONTEXT_PROCESSORS, we added: 44 {{{ 45 #!python 42 46 "mysite.context_processors.common", 47 }}} 43 48 44 49 and from there, the MEDIA_URL in settings.py became available in all templates as {{ MEDIA_URL }}.