Misc. tweaks for fresh install
give more menus, define app_package, no more custom views..
This commit is contained in:
parent
d40be7ccda
commit
e688cbab6a
|
@ -107,6 +107,7 @@ class Install(commands.Subcommand):
|
|||
|
||||
# make config files
|
||||
context = {
|
||||
'app_package': 'messkit',
|
||||
'app_title': "Messkit",
|
||||
'appdir': appdir,
|
||||
'db_url': dburl,
|
||||
|
|
|
@ -28,44 +28,45 @@ Web Menus
|
|||
def simple_menus(request):
|
||||
url = request.route_url
|
||||
|
||||
# reports_menu = {
|
||||
# 'title': "Reports",
|
||||
# 'type': 'menu',
|
||||
# 'items': [
|
||||
# {
|
||||
# 'title': "New Report",
|
||||
# 'url': url('report_output.create'),
|
||||
# 'perm': 'report_output.create',
|
||||
# },
|
||||
# {
|
||||
# 'title': "Generated Reports",
|
||||
# 'url': url('report_output'),
|
||||
# 'perm': 'report_output.list',
|
||||
# },
|
||||
# {
|
||||
# 'title': "Problem Reports",
|
||||
# 'url': url('problem_reports'),
|
||||
# 'perm': 'problem_reports.list',
|
||||
# },
|
||||
# ],
|
||||
# }
|
||||
people_menu = {
|
||||
'title': "People",
|
||||
'type': 'menu',
|
||||
'items': [
|
||||
{
|
||||
'title': "All People",
|
||||
'route': 'people',
|
||||
'perm': 'people.list',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
# other_menu = {
|
||||
# 'title': "Other",
|
||||
# 'type': 'menu',
|
||||
# 'items': [
|
||||
# {
|
||||
# 'title': "Generate New Feature",
|
||||
# 'url': url('generate_feature'),
|
||||
# 'perm': 'common.generate_feature',
|
||||
# },
|
||||
# {
|
||||
# 'title': "Generate New Project",
|
||||
# 'url': url('generate_project'),
|
||||
# 'perm': 'common.generate_project',
|
||||
# },
|
||||
# ],
|
||||
# }
|
||||
reports_menu = {
|
||||
'title': "Reports",
|
||||
'type': 'menu',
|
||||
'items': [
|
||||
{
|
||||
'title': "New Report",
|
||||
'route': 'report_output.create',
|
||||
'perm': 'report_output.create',
|
||||
},
|
||||
{
|
||||
'title': "Generated Reports",
|
||||
'route': 'report_output',
|
||||
'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 = {
|
||||
'title': "Admin",
|
||||
|
@ -97,11 +98,11 @@ def simple_menus(request):
|
|||
'url': url('emailprofiles'),
|
||||
'perm': 'emailprofiles.list',
|
||||
},
|
||||
# {
|
||||
# 'title': "Email Attempts",
|
||||
# 'url': url('email_attempts'),
|
||||
# 'perm': 'email_attempts.list',
|
||||
# },
|
||||
{
|
||||
'title': "Email Attempts",
|
||||
'url': url('email_attempts'),
|
||||
'perm': 'email_attempts.list',
|
||||
},
|
||||
{
|
||||
'title': "Raw Settings",
|
||||
'url': url('settings'),
|
||||
|
@ -132,8 +133,8 @@ def simple_menus(request):
|
|||
}
|
||||
|
||||
menus = [
|
||||
# reports_menu,
|
||||
# other_menu,
|
||||
people_menu,
|
||||
reports_menu,
|
||||
admin_menu,
|
||||
]
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Messkit web views
|
|||
def includeme(config):
|
||||
|
||||
# core
|
||||
config.include('messkit.web.views.common')
|
||||
config.include('tailbone.views.common')
|
||||
config.include('tailbone.views.auth')
|
||||
config.include('tailbone.views.menus')
|
||||
# config.include('tailbone.views.importing')
|
||||
|
|
|
@ -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)
|
Loading…
Reference in a new issue