You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like flask-nav, thanks for sharing this code with your insights.
I have run into a minor issue.
The example does not work completely; you don't get to see Widgets Inc. It seems like the first object of Navbar has no effect.
I use flask 0.12.1. This is a navbar which does show Widgets inc and shows the problem.
nav.register_element(
'top',
Navbar(
None, # NOTE: here is the problem, what ever you put first has no effect# if you put an object first it is not renderedView('Widgits, Inc.', 'index'),
View('Our Mission', 'about'),
Subgroup('Products',
View('Wg240-Series',
'products',
product='wg240'),
View('Wg250-Series',
'products',
product='wg250'),
Separator(),
Text('Discontinued Products'),
View('Wg10X',
'products',
product='wg10x'), ),
Link('Tech Support', 'http://techsupport.invalid/widgits_inc'), ))
The text was updated successfully, but these errors were encountered:
Yesterday, too, I ran into this problem. The reason for this behavior is as follows: class Navbar inherits from class Subgroup: class Navbar(Subgroup): pass
, but class Subgroup when creating the first parameter takes the value of the title: class Subgroup(NavigationItem): def __init__(self, title, *items): self.title = title self.items = list(items)
Dear @mbr,
I like flask-nav, thanks for sharing this code with your insights.
I have run into a minor issue.
The example does not work completely; you don't get to see Widgets Inc. It seems like the first object of Navbar has no effect.
I use flask 0.12.1. This is a navbar which does show Widgets inc and shows the problem.
The text was updated successfully, but these errors were encountered: