2024-11-26 11:16:09 -06:00
|
|
|
# -*- coding: utf-8; -*-
|
|
|
|
|
"""
|
|
|
|
|
{{cookiecutter.project_name}} Menu
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from wuttaweb import menus as base
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class {{cookiecutter.__studly_prefix}}MenuHandler(base.MenuHandler):
|
|
|
|
|
"""
|
|
|
|
|
{{cookiecutter.project_name}} menu handler
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def make_menus(self, request, **kwargs):
|
|
|
|
|
|
2025-12-31 20:28:15 -06:00
|
|
|
# nb. the products menu is just an example; you should
|
|
|
|
|
# replace it and add more as needed
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
self.make_products_menu(request),
|
|
|
|
|
self.make_admin_menu(request, include_people=True),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
def make_products_menu(self, request):
|
|
|
|
|
return {
|
|
|
|
|
"title": "Products",
|
|
|
|
|
"type": "menu",
|
|
|
|
|
"items": [
|
|
|
|
|
{
|
|
|
|
|
"title": "Products",
|
|
|
|
|
"route": "products",
|
|
|
|
|
"perm": "products.list",
|
|
|
|
|
},
|
|
|
|
|
{'type': 'sep'},
|
|
|
|
|
{
|
|
|
|
|
"title": "Vendors",
|
|
|
|
|
"route": "vendors",
|
|
|
|
|
"perm": "vendors.list",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
}
|