Closed stevelacey closed 6 years ago
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.
So what do you suggest, stop using this as a builtin?
Want to point out that in Django 1.9 the request
is now found in django.template.context_processors.request
.
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