Let tailbone providers include static views
also add more native (batch) views to default list
This commit is contained in:
parent
d18bade951
commit
7c4e9b56c7
|
@ -154,11 +154,19 @@ def make_pyramid_config(settings, configure_csrf=True):
|
|||
else:
|
||||
config.include('pyramid_retry')
|
||||
|
||||
# configure DB sessions associated with transaction manager
|
||||
# fetch all tailbone providers
|
||||
providers = get_all_providers(rattail_config)
|
||||
for provider in six.itervalues(providers):
|
||||
|
||||
# configure DB sessions associated with transaction manager
|
||||
provider.configure_db_sessions(rattail_config, config)
|
||||
|
||||
# add any static includes
|
||||
includes = provider.get_static_includes()
|
||||
if includes:
|
||||
for spec in includes:
|
||||
config.include(spec)
|
||||
|
||||
# Add some permissions magic.
|
||||
config.add_directive('add_tailbone_permission_group', 'tailbone.auth.add_permission_group')
|
||||
config.add_directive('add_tailbone_permission', 'tailbone.auth.add_permission')
|
||||
|
|
|
@ -42,6 +42,9 @@ class TailboneProvider(object):
|
|||
def configure_db_sessions(self, rattail_config, pyramid_config):
|
||||
pass
|
||||
|
||||
def get_static_includes(self):
|
||||
pass
|
||||
|
||||
def get_provided_views(self):
|
||||
return {}
|
||||
|
||||
|
|
|
@ -170,6 +170,31 @@ class PoserViewView(PoserMasterView):
|
|||
},
|
||||
},
|
||||
|
||||
'batches': {
|
||||
|
||||
'tailbone.views.batch.delproduct': {
|
||||
'label': "Delete Product",
|
||||
},
|
||||
'tailbone.views.batch.inventory': {
|
||||
'label': "Inventory",
|
||||
},
|
||||
'tailbone.views.batch.labels': {
|
||||
'label': "Labels",
|
||||
},
|
||||
'tailbone.views.batch.newproduct': {
|
||||
'label': "New Product",
|
||||
},
|
||||
'tailbone.views.batch.pricing': {
|
||||
'label': "Pricing",
|
||||
},
|
||||
'tailbone.views.batch.product': {
|
||||
'label': "Product",
|
||||
},
|
||||
'tailbone.views.batch.vendorcatalog': {
|
||||
'label': "Vendor Catalog",
|
||||
},
|
||||
},
|
||||
|
||||
'other': {
|
||||
|
||||
'tailbone.views.stores': {
|
||||
|
|
Loading…
Reference in a new issue