flask-navigation
flask-navigation copied to clipboard
Build navigation bars in your Flask application.
This line of code: https://github.com/tonyseek/flask-navigation/blob/develop/flask_navigation/api.py#L48 Means that if you name the navigation object something other than `nav` it won't work. Similarly, you are limited to only one navigation instance per...
Actually it's not possible to write: ``` python from flask import g args_getter = lambda: {'user': g.current_user} nav.Bar('usermenu', ( nav.Item(_('Dashboard'), 'user.dashboard', args_getter), nav.Item(_('Profile'), 'user.profile', args_getter), nav.Item(_('Settings'), 'user.settings', args_getter), )) ```...
In the topic of #5 we found the automatic-naming item is a bad idea.
The related topic is here #4 The situation is like this: ``` python top_bar = nav.Bar('top', [ nav.Item(u'Home', 'home'), nav.Item(u'Posts', 'post_list'), ]) @bp.route('/post/') def post(post_id): post = Post.query.get_or_404(post_id) return render_template('post.html',...
With the Flask reloader in development, the app context may be pushed many times. It may cause the `initializer` function of `NavigationBar` be executed multiple times.