# Example: "http://media.lawrence.com"
MEDIA_URL = ''
+# URL prefix for static files. Will be made available by
+# ee.tools.context_processors.static
+STATIC_URL_PREFIX = '/static/'
+
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
"django.core.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
+ # Add STATIC_URL_PREFIX to the context
+ "ee.tools.context_processors.static",
)
LOGIN_URL = "/accounts/login/"
--- /dev/null
+from django.conf import settings
+
+"""
+Some useful context processors.
+"""
+def static(request):
+ """
+ Adds url of static files to the context.
+ Requires STATIC_URL to be set in the settings.
+
+ """
+ return {'STATIC_URL_PREFIX': settings.STATIC_URL_PREFIX}