Massive overhaul of "generate project" feature

previous incarnation was woefully lacking.  new feature is much more
extensible.  still need to remove old POS integration specifics in
some places.

and a couple of unrelated things that snuck in..

- deprecate `rattail.util.OrderedDict`
- deprecate `rattail.util.import_module_path()`
- deprecate `rattail.util.import_reload()`
This commit is contained in:
Lance Edgar 2023-05-05 00:18:16 -05:00
parent 026d98551c
commit 2ed63b1c1a
22 changed files with 424 additions and 700 deletions

View file

@ -667,11 +667,18 @@ class MenuHandler(GenericHandler):
'route': 'appinfo',
'perm': 'appinfo.list',
},
{
'title': "Label Settings",
'route': 'labelprofiles',
'perm': 'labelprofiles.list',
},
])
if kwargs.get('include_label_settings', False):
items.extend([
{
'title': "Label Settings",
'route': 'labelprofiles',
'perm': 'labelprofiles.list',
},
])
items.extend([
{
'title': "Raw Settings",
'route': 'settings',
@ -807,7 +814,7 @@ def make_menu_entry(request, item):
try:
entry['url'] = request.route_url(entry['route'])
except KeyError: # happens if no such route
log.debug("invalid route name for menu entry: %s", entry)
log.warning("invalid route name for menu entry: %s", entry)
entry['url'] = entry['route']
entry['key'] = entry['route']
else: