Clean up some view, menu config etc.

This commit is contained in:
Lance Edgar 2022-03-05 10:51:22 -06:00
parent 359cc90a0a
commit 9bb0bca325
3 changed files with 9 additions and 47 deletions

View file

@ -43,9 +43,3 @@ class MesskitConfig(ConfigExtension):
config.setdefault('tailbone', 'menus', 'messkit.web.menus') config.setdefault('tailbone', 'menus', 'messkit.web.menus')
config.setdefault('rattail', 'model', 'messkit.db.model') config.setdefault('rattail', 'model', 'messkit.db.model')
config.setdefault('rattail', 'settings', 'messkit.appsettings') config.setdefault('rattail', 'settings', 'messkit.appsettings')
# # always try to append poser to path
# # TODO: location of poser dir should come from config/app/handler?
# poser = os.path.join(sys.prefix, 'app', 'poser')
# if poser not in sys.path and os.path.isdir(poser):
# sys.path.append(poser)

View file

@ -26,7 +26,6 @@ Web Menus
def simple_menus(request): def simple_menus(request):
url = request.route_url
people_menu = { people_menu = {
'title': "People", 'title': "People",
@ -74,54 +73,39 @@ def simple_menus(request):
'items': [ 'items': [
{ {
'title': "Users", 'title': "Users",
'url': url('users'), 'route': 'users',
'perm': 'users.list', 'perm': 'users.list',
}, },
# {
# 'title': "User Events",
# 'url': url('userevents'),
# 'perm': 'userevents.list',
# },
{ {
'title': "Roles", 'title': "Roles",
'url': url('roles'), 'route': 'roles',
'perm': 'roles.list', 'perm': 'roles.list',
}, },
{'type': 'sep'}, {'type': 'sep'},
{ {
'title': "App Settings", 'title': "App Settings",
'url': url('appsettings'), 'route': 'appsettings',
'perm': 'settings.list', 'perm': 'settings.list',
}, },
{ {
'title': "Email Settings", 'title': "Email Settings",
'url': url('emailprofiles'), 'route': 'emailprofiles',
'perm': 'emailprofiles.list', 'perm': 'emailprofiles.list',
}, },
{ {
'title': "Raw Settings", 'title': "Raw Settings",
'url': url('settings'), 'route': 'settings',
'perm': 'settings.list', 'perm': 'settings.list',
}, },
{'type': 'sep'}, {'type': 'sep'},
# {
# 'title': "DataSync Changes",
# 'url': url('datasyncchanges'),
# 'perm': 'datasync_changes.list',
# },
# {
# 'title': "Importing / Exporting",
# 'url': url('importing'),
# 'perm': 'importing.list',
# },
{ {
'title': "Tables", 'title': "Tables",
'url': url('tables'), 'route': 'tables',
'perm': 'tables.list', 'perm': 'tables.list',
}, },
{ {
'title': "Messkit Upgrades", 'title': "Messkit Upgrades",
'url': url('upgrades'), 'route': 'upgrades',
'perm': 'upgrades.list', 'perm': 'upgrades.list',
}, },
], ],

View file

@ -29,25 +29,9 @@ from tailbone.util import include_configured_views
def includeme(config): def includeme(config):
# core config.include('tailbone.views.essentials')
config.include('tailbone.views.common')
config.include('tailbone.views.auth')
config.include('tailbone.views.menus')
# config.include('tailbone.views.importing')
config.include('tailbone.views.poser') config.include('tailbone.views.poser')
config.include('tailbone.views.progress')
# config.include('tailbone.views.features')
config.include('tailbone.views.reports') config.include('tailbone.views.reports')
# main tables
config.include('tailbone.views.email')
config.include('tailbone.views.people')
config.include('tailbone.views.roles')
config.include('tailbone.views.settings')
config.include('tailbone.views.tables')
config.include('tailbone.views.upgrades')
config.include('tailbone.views.users')
include_configured_views(config) include_configured_views(config)