Tweak view config etc. per upstream changes

This commit is contained in:
Lance Edgar 2023-06-10 16:53:39 -05:00
parent 3ece00f059
commit 080e9fa3b4
2 changed files with 8 additions and 45 deletions

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Rattail -- Retail Software Framework # Rattail -- Retail Software Framework
# Copyright © 2010-2022 Lance Edgar # Copyright © 2010-2023 Lance Edgar
# #
# This file is part of Rattail. # This file is part of Rattail.
# #
@ -56,12 +56,6 @@ def main(global_config, **settings):
# establish pyramid config # establish pyramid config
pyramid_config = app.make_pyramid_config(settings) pyramid_config = app.make_pyramid_config(settings)
# CORE-POS DB(s)
if integrate_corepos(rattail_config):
from tailbone_corepos.db import CoreOfficeSession, CoreTransSession
CoreOfficeSession.configure(bind=rattail_config.corepos_engine)
CoreTransSession.configure(bind=rattail_config.coretrans_engine)
# Catapult DB(s) # Catapult DB(s)
if integrate_catapult(rattail_config): if integrate_catapult(rattail_config):
from tailbone_onager.db import CatapultSession, ExtraCatapultSessions from tailbone_onager.db import CatapultSession, ExtraCatapultSessions
@ -86,10 +80,6 @@ def main(global_config, **settings):
pyramid_config.include('theo.web.subscribers') pyramid_config.include('theo.web.subscribers')
pyramid_config.include('theo.web.views') pyramid_config.include('theo.web.views')
# for graceful handling of postgres restart
pyramid_config.add_tween('tailbone.tweens.sqlerror_tween_factory',
under='pyramid_tm.tm_tween_factory')
return pyramid_config.make_wsgi_app() return pyramid_config.make_wsgi_app()

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Rattail -- Retail Software Framework # Rattail -- Retail Software Framework
# Copyright © 2010-2022 Lance Edgar # Copyright © 2010-2023 Lance Edgar
# #
# This file is part of Rattail. # This file is part of Rattail.
# #
@ -24,6 +24,8 @@
Views Views
""" """
from tailbone.views import typical
from theo.config import integrate_catapult, integrate_corepos, integrate_locsms from theo.config import integrate_catapult, integrate_corepos, integrate_locsms
@ -31,51 +33,22 @@ def includeme(config):
rattail_config = config.registry.settings.get('rattail_config') rattail_config = config.registry.settings.get('rattail_config')
config.include('tailbone.views.essentials') config.include('tailbone.views.essentials')
# main table views
config.include('tailbone.views.brands')
config.include('tailbone.views.customergroups')
config.include('tailbone.views.customers')
config.include('tailbone.views.departments')
config.include('tailbone.views.employees')
config.include('tailbone.views.members')
config.include('tailbone.views.messages') config.include('tailbone.views.messages')
config.include('tailbone.views.products')
config.include('tailbone.views.reportcodes')
config.include('tailbone.views.stores')
config.include('tailbone.views.subdepartments')
config.include('tailbone.views.taxes')
config.include('tailbone.views.uoms')
config.include('tailbone.views.vendors')
# customer orders
config.include('tailbone.views.custorders')
# purchasing / receiving
config.include('tailbone.views.purchasing')
config.include('tailbone.views.batch.vendorcatalog')
# trainwreck
config.include('tailbone.views.trainwreck.defaults') config.include('tailbone.views.trainwreck.defaults')
# do we integrate w/ Catapult? mods = {}
if integrate_catapult(rattail_config): if integrate_catapult(rattail_config):
config.include('tailbone.views.purchases')
config.include('tailbone_onager.views') config.include('tailbone_onager.views')
config.include('tailbone_onager.views.catapult') config.include('tailbone_onager.views.catapult')
# do we integrate w/ CORE-POS?
elif integrate_corepos(rattail_config): elif integrate_corepos(rattail_config):
config.include('tailbone_corepos.views.purchases')
config.include('tailbone.views.purchases.credits')
config.include('tailbone_corepos.views') config.include('tailbone_corepos.views')
config.include('tailbone_corepos.views.corepos') config.include('tailbone_corepos.views.corepos')
mods['tailbone.views.purchases'] = 'tailbone_corepos.views.purchases'
# do we integrate w/ LOC SMS?
elif integrate_locsms(rattail_config): elif integrate_locsms(rattail_config):
config.include('tailbone.views.purchases')
config.include('tailbone_locsms.views') config.include('tailbone_locsms.views')
config.include('tailbone_locsms.views.locsms') config.include('tailbone_locsms.views.locsms')
else: # no POS integration typical.defaults(config, **mods)
config.include('tailbone.views.purchases')