diff --git a/flask_bootstrap/nav.py b/flask_bootstrap/nav.py index 1f3ca5b2..da375975 100644 --- a/flask_bootstrap/nav.py +++ b/flask_bootstrap/nav.py @@ -48,10 +48,14 @@ def visit_Navbar(self, node): id=node_id, )) bar_list = bar.add(tags.ul(_class='nav navbar-nav')) + bar_list_right = bar.add(tags.ul(_class='nav navbar-nav navbar-right')) for item in node.items: - bar_list.add(self.visit(item)) - + if hasattr(item, 'right'): + bar_list_right.add(self.visit(item)) + else: + bar_list.add(self.visit(item)) + return root def visit_Text(self, node):