You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.
I see django_bootstrap_breadcrumbs.templatetags.django_bootstrap_breadcrumbs: ERROR: request object not found in context! Check if 'django.core.context_processors.request' is in TEMPLATE_CONTEXT_PROCESSORS in my test run all of the time – could this check be made smarter – could just check the setting itself?
django.core.context_processors.request is in my TEMPLATE_CONTEXT_PROCESSORS, the request isn't available because the template is manually rendered.
I add_to_builtins('django_bootstrap_breadcrumbs.templatetags.django_bootstrap_breadcrumbs') in urls.py, so I don't have to write {% load django_bootstrap_breadcrumbs %} everywhere. Is this a bad idea, should I stop? Or should this just not error like this?
The text was updated successfully, but these errors were encountered:
stevelacey
changed the title
request object not found in context! Check if 'django.core.context_processors.request' is in TEMPLATE_CONTEXT_PROCESSORS
Make TEMPLATE_CONTEXT_PROCESSORS check smarter or more lenient
May 13, 2015
stevelacey
changed the title
Make TEMPLATE_CONTEXT_PROCESSORS check smarter or more lenient
Make TEMPLATE_CONTEXT_PROCESSORS checks smarter or more lenient
May 13, 2015
Well, django_bootstrap_breadcrumbs needs to access request object in the context, if it's not there it won't work, so it's checking the right thing. Just having django.core.context_processors.request in settings won't help if request object is not there.
I see
django_bootstrap_breadcrumbs.templatetags.django_bootstrap_breadcrumbs: ERROR: request object not found in context! Check if 'django.core.context_processors.request' is in TEMPLATE_CONTEXT_PROCESSORS
in my test run all of the time – could this check be made smarter – could just check the setting itself?django.core.context_processors.request
is in myTEMPLATE_CONTEXT_PROCESSORS
, the request isn't available because the template is manually rendered.I
add_to_builtins('django_bootstrap_breadcrumbs.templatetags.django_bootstrap_breadcrumbs')
in urls.py, so I don't have to write{% load django_bootstrap_breadcrumbs %}
everywhere. Is this a bad idea, should I stop? Or should this just not error like this?https://github.com/prymitive/bootstrap-breadcrumbs/blob/master/django_bootstrap_breadcrumbs/templatetags/django_bootstrap_breadcrumbs.py#L95-L97
The text was updated successfully, but these errors were encountered: