From 2619869ceb658504e8fd443fcb452cfbfcbc5cd2 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 6 Sep 2020 14:47:44 -0500 Subject: [PATCH] Add menu links to generate new project, plus docs, source code etc. --- rattail_demo/web/menus.py | 27 +++++++++++++++++++++++++++ rattail_demo/web/views/__init__.py | 3 +++ 2 files changed, 30 insertions(+) diff --git a/rattail_demo/web/menus.py b/rattail_demo/web/menus.py index 9d33a2b..b9f2827 100644 --- a/rattail_demo/web/menus.py +++ b/rattail_demo/web/menus.py @@ -222,6 +222,33 @@ def simple_menus(request): }, ], }, + { + 'title': "Other", + 'type': 'menu', + 'items': [ + { + 'title': "Documentation", + 'url': 'https://rattailproject.org/moin/RattailDemo', + 'target': '_blank', + }, + { + 'title': "Source Code", + 'url': 'https://kallithea.rattailproject.org/rattail-project/rattail-demo', + 'target': '_blank', + }, + { + 'title': "RattailProject.org", + 'url': 'https://rattailproject.org', + 'target': '_blank', + }, + {'type': 'sep'}, + { + 'title': "Generate New Project", + 'url': url('generate_project'), + 'perm': 'common.generate_project', + }, + ], + }, { 'title': "Admin", 'type': 'menu', diff --git a/rattail_demo/web/views/__init__.py b/rattail_demo/web/views/__init__.py index 577bc35..c3cada0 100644 --- a/rattail_demo/web/views/__init__.py +++ b/rattail_demo/web/views/__init__.py @@ -48,3 +48,6 @@ def includeme(config): config.include('tailbone.views.handheld') config.include('tailbone.views.batch.inventory') config.include('tailbone.views.batch.importer') + + # generate new project + config.include('tailbone.views.projects')