Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

More about the application menu

Introduction

In Playing with the Django shell we discovered the lino.api.doctest.show_menu() function, which prints the application menu.

The application menu is an important part of every Lino application. While the dashboard shows only the most frequently used data tables, the application menu gives (or should give) access to every part of your application.

application menu

The application menu or main menu specifies how the different functionalities of an application are structured when presenting them to a site user.

Every application has one and only one application menu. It’s the same structure for everybody, but users will see only the parts to which they have access permission. The menu shrinks or expands according to the user’s permissions.

The primitive application menu

For simple applications you can define the complete menu by overriding the lino.core.site.Site.setup_menu() method of your application.

An example for this approach is in The mysite/settings.py file. Let’s have a look at this application.

>>> from lino import startup
>>> startup('lino_book.projects.polls.mysite.settings')

You have seen the application menu in a browser window. But you can also show it in a documentation page or an interactive Django shell:

>>> from lino.api.doctest import *
>>> show_menu('robin')
- Polls : Questions, Choices
- Site : About

The pluggable application menu

See How plugins build the application menu.