Questions tagged [flask-nav]

9 questions
3
votes
2 answers

Accessing Flask Session variables from Flask Navigation for dynamic navigation menu

I want to have a dynamic navigation menu that shows "Login" if the user is not currently logged on, and "Logout" if the user is logged in. I'm using code similar to the following: import flask import flask_nav import flask_nav.elements as…
Glenn Strycker
  • 4,816
  • 6
  • 31
  • 51
3
votes
2 answers

Flask-Nav with dynamic 'secondary' navbar

Flask-Nav allows dynamic construction; however, I cannot figure out how to do this from passing a dictionary or list to the function to build the Navbar. @nav.navigation def top_nav(): # ... According to the docs, this is called every time…
flamusdiu
  • 1,722
  • 2
  • 14
  • 31
2
votes
2 answers

Flask Nav with Flask Bootstrap: 'Navbar' object has no attribute 'kwargs'

In this code Flask Nav works until I add the Flask Bootstrap code: from flask import Flask, render_template from flask_bootstrap import Bootstrap from flask_nav import Nav from flask_nav.elements import Navbar, Subgroup, View, Link, Text,…
Joe Gillon
  • 107
  • 10
1
vote
0 answers

Flask: Navbar generation with flask_navbar

I have an application with static navbar. Now I want to generate it dynamically (different for admin and non-admin users, inject modules items etc). So I decided to use flask_navbar for that. Upon completion the generated HTML is slightly different…
Ralfeus
  • 845
  • 9
  • 31
1
vote
2 answers

How to replace brand text with an image in flask-nav

I've got a nav-bar showing in my flask-bootstrap application by importing flask-nav and using the following: @nav.navigation() def mynavbar(): return Navbar( 'MyCompany', View('Main', 'index'), View('Config', 'config'), …
Keir Finlow-Bates
  • 993
  • 2
  • 14
  • 27
0
votes
1 answer

whether to use Flask-Navigation

I've implemented navigation in a small flask powered website like this and it seems to do the job:
Home
cardamom
  • 6,873
  • 11
  • 48
  • 102
0
votes
1 answer

how to convert a logo of Navbar(logo, View('Home', ... from Flask-Nav module to a clickable link

in python code part (as app.py) in the part of menubar we can define our navebar as : # Define navbar with logo # ####################################################### logo = img(src='/static/img/logo192.png',…
Fethi Pounct
  • 1,059
  • 5
  • 6
0
votes
2 answers

flask-nav not working with flask-bootstrap sample application

I'm trying to recreate this sample app that is supplied with flask-bootstrap, but have run into an issue rendering the navbar. I get the error: inja2.exceptions.UndefinedError: 'flask_nav.Nav object' has no attribute 'fronend_top' The example app is…
nicholas.reichel
  • 2,260
  • 7
  • 20
  • 28
0
votes
1 answer

How to add Bootrsap icons to Flask-Nav navbar

I am using Flask-Bootrsap/ Flask-Nav support to generate a navbar for my webapp. I have some issues trying to style it. I would like to add bootrsap or font/awesome icons but i don't know how to do it directly from my…
Ana
  • 167
  • 3
  • 17