Misc. tweaks for fresh install

give more menus, define app_package, no more custom views..
This commit is contained in:
Lance Edgar 2022-03-04 17:45:59 -06:00
parent d40be7ccda
commit e688cbab6a
4 changed files with 47 additions and 84 deletions

View file

@ -107,6 +107,7 @@ class Install(commands.Subcommand):
# make config files # make config files
context = { context = {
'app_package': 'messkit',
'app_title': "Messkit", 'app_title': "Messkit",
'appdir': appdir, 'appdir': appdir,
'db_url': dburl, 'db_url': dburl,

View file

@ -28,44 +28,45 @@ Web Menus
def simple_menus(request): def simple_menus(request):
url = request.route_url url = request.route_url
# reports_menu = { people_menu = {
# 'title': "Reports", 'title': "People",
# 'type': 'menu', 'type': 'menu',
# 'items': [ 'items': [
# { {
# 'title': "New Report", 'title': "All People",
# 'url': url('report_output.create'), 'route': 'people',
# 'perm': 'report_output.create', 'perm': 'people.list',
# }, },
# { ],
# 'title': "Generated Reports", }
# 'url': url('report_output'),
# 'perm': 'report_output.list',
# },
# {
# 'title': "Problem Reports",
# 'url': url('problem_reports'),
# 'perm': 'problem_reports.list',
# },
# ],
# }
# other_menu = { reports_menu = {
# 'title': "Other", 'title': "Reports",
# 'type': 'menu', 'type': 'menu',
# 'items': [ 'items': [
# { {
# 'title': "Generate New Feature", 'title': "New Report",
# 'url': url('generate_feature'), 'route': 'report_output.create',
# 'perm': 'common.generate_feature', 'perm': 'report_output.create',
# }, },
# { {
# 'title': "Generate New Project", 'title': "Generated Reports",
# 'url': url('generate_project'), 'route': 'report_output',
# 'perm': 'common.generate_project', 'perm': 'report_output.list',
# }, },
# ], {
# } 'title': "Problem Reports",
'route': 'problem_reports',
'perm': 'problem_reports.list',
},
{'type': 'sep'},
{
'title': "Poser Reports",
'route': 'poser.reports',
'perm': 'poser.reports.list',
},
],
}
admin_menu = { admin_menu = {
'title': "Admin", 'title': "Admin",
@ -97,11 +98,11 @@ def simple_menus(request):
'url': url('emailprofiles'), 'url': url('emailprofiles'),
'perm': 'emailprofiles.list', 'perm': 'emailprofiles.list',
}, },
# { {
# 'title': "Email Attempts", 'title': "Email Attempts",
# 'url': url('email_attempts'), 'url': url('email_attempts'),
# 'perm': 'email_attempts.list', 'perm': 'email_attempts.list',
# }, },
{ {
'title': "Raw Settings", 'title': "Raw Settings",
'url': url('settings'), 'url': url('settings'),
@ -132,8 +133,8 @@ def simple_menus(request):
} }
menus = [ menus = [
# reports_menu, people_menu,
# other_menu, reports_menu,
admin_menu, admin_menu,
] ]

View file

@ -28,7 +28,7 @@ Messkit web views
def includeme(config): def includeme(config):
# core # core
config.include('messkit.web.views.common') config.include('tailbone.views.common')
config.include('tailbone.views.auth') config.include('tailbone.views.auth')
config.include('tailbone.views.menus') config.include('tailbone.views.menus')
# config.include('tailbone.views.importing') # config.include('tailbone.views.importing')

View file

@ -1,39 +0,0 @@
# -*- coding: utf-8; -*-
######################################################################
#
# Messkit -- Generic-ish Data Utility App
# Copyright © 2022 Lance Edgar
#
# This file is part of Messkit.
#
# Messkit is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Messkit is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Messkit. If not, see <http://www.gnu.org/licenses/>.
#
######################################################################
"""
Common views
"""
from tailbone.views import common as base
import messkit
class CommonView(base.CommonView):
project_title = "Messkit"
project_version = messkit.__version__ + '+dev'
def includeme(config):
CommonView.defaults(config)