Skip to content

Commit

Permalink
fix: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
utnapischtim committed Mar 19, 2024
1 parent a603135 commit d6541d3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions invenio_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
>>> from flask import Flask, render_template_string
>>> from invenio_theme import InvenioTheme
>>> from flask_menu import register_menu
>>> app = Flask('myapp')
>>> theme = InvenioTheme(app)
Expand Down Expand Up @@ -421,9 +420,8 @@ def init_config(app):
For instance if you want to plug an menu item in the navigation bar you can do
it like this:
>>> from flask_menu import register_menu
>>> menu.submenu(".main.myitem").register("myview2", "My item", order=1)
>>> @app.route('/myview2')
... @register_menu(app, 'main.myitem', 'My item', order=1)
... def myview2():
... return ""
Expand Down Expand Up @@ -459,8 +457,8 @@ def init_config(app):
.. code-block:: python
menu.submenu(".settings.item1").register("settings_item_1", "Item 1", order=2)
@app.route('/settings/')
@register_menu(app, 'settings.item1', 'Item 1', order=2)
def settings_item_1():
return render_template('invenio_foo/foo_settings.html')
Expand Down

0 comments on commit d6541d3

Please sign in to comment.