inveniosoftware / inveniosoftware/flask-breadcrumbs

Flask-Breadcrumbs Not working

Open
#42 1 comment 0 reactions 0 assignees View on GitHub
Need: information Need: tests
Dominant language
Python
Stars
30
Forks
24
PR merge metrics
No merged PRs in 30d

Description

Hello,

I have implement Flask-Breadcrumbs menu in my flask app. but it will give me key error like "**KeyError: 'menu'**"

I will show you some code:
Py File

from flask_breadcrumbs import Breadcrumbs, register_breadcrumb,default_breadcrumb_root
Breadcrumbs(app=app)
default_breadcrumb_root(user_blueprint,'.')

@user_blueprint.route('/user/register')
@register_breadcrumb(user_blueprint, '.user.register', 'Home')
def register():
error = None
return render_template('register.html',error=error)

register.html File


{%- for breadcrumb in breadcrumbs -%}
{{ breadcrumb.text }}
{{ '/' if not loop.last }}
{%- endfor -%}

![keyerror menu werkzeug debugger](https://cloud.githubusercontent.com/assets/23516944/20513871/c2892f42-b0ae-11e6-9ce5-d3dc86cc02e2.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported KeyError: 'menu' with the shown Breadcrumbs(app=app), default_breadcrumb_root, register_breadcrumb, and register.html template setup. Inspect the Flask-Breadcrumbs entry points involved in breadcrumb registration and template rendering. Done means the example renders its breadcrumbs without the KeyError and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.