Django-jet: TemplateDoesNotExist: admin/breadcrumbs.html

Created on 16 Aug 2016  路  5Comments  路  Source: geex-arts/django-jet

I updated from Django JET 0.1.4 (with Django 1.9.7) to JET 0.9.0 (Django 1.10) and I get this error:

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/admin/manager/devices/2/

Django Version: 1.10
Python Version: 2.7.9
Installed Applications:
['manager',
'jet.dashboard',
'jet',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']

Template loader postmortem
Django tried loading these templates, in this order:

Using engine django:
* django.template.loaders.app_directories.Loader: D:\Workspace\DeviceManager\dm-web\manager\templates\admin\breadcrumbs.html (Source does not exist)
* django.template.loaders.app_directories.Loader: d:\Workspace\DeviceManager\dm-web.env\lib\site-packages\jet\dashboard\templates\admin\breadcrumbs.html (Source does not exist)
* django.template.loaders.app_directories.Loader: d:\Workspace\DeviceManager\dm-web.env\lib\site-packages\jet\templates\admin\breadcrumbs.html (Source does not exist)
* django.template.loaders.app_directories.Loader: d:\Workspace\DeviceManager\dm-web.env\lib\site-packages\django\contrib\admin\templates\admin\breadcrumbs.html (Source does not exist)
* django.template.loaders.app_directories.Loader: d:\Workspace\DeviceManager\dm-web.env\lib\site-packages\django\contrib\auth\templates\admin\breadcrumbs.html (Source does not exist)

Template error:
In template D:\Workspace\DeviceManager\dm-web\manager\templates\manager\view_device.html, error at line 0
admin/breadcrumbs.html 1 : {% extends "admin/change_form.html" %}
2 : {% load i18n admin_urls static admin_modify manager_tags %}
3 :
4 : {% block extrahead %}{{ block.super }}
5 :
6 : {% endblock %}
7 :
8 : {% if not is_popup %}
9 : {% block breadcrumbs %}
10 :

As you can see, the template "admin/breadcrumbs.html" is loaded from FormatBreadcrumbsNode class, which is instanced in format_breadcrumbs.

I checked Django 1.9.7 and Django JET 0.1.4 templates looking for it. I found admin/breadcrumbs.html in JET 0.1.4. In JET 0.9.0 this template just disappeared (and it isn't in Django 1.10), turning the tag format_breadcrumbs unusable.

Please, can you check it?

PS: I just tried to copy the old template in my app's template directory and it just worked.

Most helpful comment

Hello @imdario !

0.9.0 is a major update which tries to maximally decrease number of template overrides and stick to django layout. So now it doesn't modify breadcrumbs with format_breadcrumbs tag. Btw I have forgotten to delete it completely.

In your templates\manager\view_device.html file you are using format_breadcrumbs tag as far as i understood. So a correct way to resolve this issue is to remove format_breadcrumbs tag at all and make breadcrumbs block look the same way as default django.

All 5 comments

Hello @imdario !

0.9.0 is a major update which tries to maximally decrease number of template overrides and stick to django layout. So now it doesn't modify breadcrumbs with format_breadcrumbs tag. Btw I have forgotten to delete it completely.

In your templates\manager\view_device.html file you are using format_breadcrumbs tag as far as i understood. So a correct way to resolve this issue is to remove format_breadcrumbs tag at all and make breadcrumbs block look the same way as default django.

@f1nality Hey man, you have to update documentation hehehehehhe

In your templates\manager\view_device.html file you are using format_breadcrumbs tag as far as i understood.

As far as I checked, I don't use it directly. Tomorrow I'll fix some post-migration "quirks" so I'll check it again (and hopefully find it).

@imdario have you checked for format_breadcrumbs usage? Btw 0.9.1 update doesn't include format_breadcrumbs tag.

Yes, I have. It was called in a template I override. I just missed it while checking previously.

Thanks for your time. Update 0.9.1 looks good!

Was this page helpful?
0 / 5 - 0 ratings