

def setup_menu(self, profile, main):
    from django.utils.translation import ugettext_lazy as _
    from django.db import models

    def doit(methodname, *args):
        for a in models.get_apps():
            meth = getattr(a, methodname, None)
            if (meth is not None):
                meth(*args)
    m = main.add_menu('master', _('Master'))
    doit('setup_main_menu', self, ui, profile, main)
    m = main.add_menu('config', _('Configure'))
    doit('setup_config_menu', self, ui, profile, m)
    m = main.add_menu('explorer', _('Explorer'))
    doit('setup_explorer_menu', self, ui, profile, m)
    m = main.add_menu('site', _('Site'))
    doit('setup_site_menu', self, ui, profile, m)

dataset/ETHPy150Open lsaffre/lino/lino/sandbox/contacts/settings.py Site.setup_menu/VarMisuse@109/131 `m`->`main`