3👍
I found a solution. It’s not sufficient adding ‘django.core.context_processors.request’ to TEMPLATE_CONTEXT_PROCESSORS tuple in settings.py.
I added also
"django.core.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media"
and now it works.
2👍
You have to add ‘django.core.context_processors.request’ to TEMPLATE_CONTEXT_PROCESSORS tuple in settings.py.
👤ml.
- [Django]-How much do imports slow down Django?
- [Django]-How can I use a Django template tag for greater than on a forloop.counter?
- [Django]-'WSGIRequest' object has no attribute 'get' when executing form.is_valid()
1👍
Maybe you forgot to add ‘treebeard’ application to INSTALLED_APPS.
My settings.py is similar to default one. I always add PROJECT_PATH = os.path.dirname(os.path.abspath(__ file__))
variable, so my TEMPLATE_DIRS looks like that:
TEMPLATE_DIRS = (
PROJECT_PATH + '/templates',
)
👤ml.
- [Django]-Make celery wait for task to finish
- [Django]-How to rewrite base url in django to add logged in username in the url of all pages instead of app name?
- [Django]-How can I fix a 403 forbidden on an apache server using Django?
- [Django]-Django data migration – class variable unavailable via get_model()
- [Django]-Python Webshop for Retailers / Distributors
Source:stackexchange.com