Example applicationΒΆ
Install the Invenio default theme and build assets:
$ pip install -e .[all]
$ cd examples
$ ./app-setup.sh
Run the development server:
$ FLASK_APP=app.py flask run --debugger -p 5000
To be able to uninstall the example app:
$ ./app-teardown.sh
The example application demonstrates the default templates and the usage of menus and breadcrumbs. The views are registered to the application menu, which is visible on the page header. For more information about menus, see Flask-Menu.
The views displayed in the menu are:
- Base page - Demonstrates the empty page template, which has an empty page_body block.
- Cover page - Demonstrates the page_cover template, which displays the page logo.
- Error pages - Demonstrates the different views for each one of the common error codes.
- Message flashing - Demonstrates the message flashing functionality and
flash template, with which you can display a flash message to the user using
the
flask.flash()
method provided by Flask. - Settings - Demonstrates the page_settings template. Inside, the submenu settings of the current menu is displayed as a list on the left of the page.
On the views that have it, the breadcrumb trail is also displayed below the menu. It displays the location of the current view in the hierarchy. The user may click on the links in the breadcrumb to navigate to the previous views. To read more about breadcrumbs, see Flask-Breadcrumbs.`