Add app settings for Catapult integration
This commit is contained in:
parent
b503815eac
commit
a98038a4bc
0
theo/appsettings/__init__.py
Normal file
0
theo/appsettings/__init__.py
Normal file
32
theo/appsettings/catapult.py
Normal file
32
theo/appsettings/catapult.py
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# -*- coding: utf-8; -*-
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# Rattail -- Retail Software Framework
|
||||||
|
# Copyright © 2010-2020 Lance Edgar
|
||||||
|
#
|
||||||
|
# This file is part of Rattail.
|
||||||
|
#
|
||||||
|
# Rattail 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.
|
||||||
|
#
|
||||||
|
# Rattail 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
|
||||||
|
# Rattail. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
"""
|
||||||
|
Theo app settings, for Catapult integration
|
||||||
|
"""
|
||||||
|
|
||||||
|
# bring in some common settings from rattail
|
||||||
|
from rattail_onager.settings import (
|
||||||
|
|
||||||
|
# Catapult
|
||||||
|
rattail_onager_catapult_importing_db_default_models,
|
||||||
|
)
|
|
@ -39,7 +39,7 @@ from rattail.settings import (
|
||||||
rattail_mail_record_attempts,
|
rattail_mail_record_attempts,
|
||||||
|
|
||||||
# Products
|
# Products
|
||||||
rattail_product_key,
|
# rattail_product_key,
|
||||||
rattail_product_key_title,
|
# rattail_product_key_title,
|
||||||
tailbone_products_show_pod_image,
|
tailbone_products_show_pod_image,
|
||||||
)
|
)
|
|
@ -41,28 +41,29 @@ class TheoConfig(ConfigExtension):
|
||||||
# Theo comes with its own menu for web app
|
# Theo comes with its own menu for web app
|
||||||
config.setdefault('tailbone', 'menus', 'theo.web.menus')
|
config.setdefault('tailbone', 'menus', 'theo.web.menus')
|
||||||
|
|
||||||
# custom App Settings
|
|
||||||
config.setdefault('rattail', 'settings', 'theo.appsettings')
|
|
||||||
|
|
||||||
# do we integrate w/ CORE-POS?
|
# do we integrate w/ CORE-POS?
|
||||||
if integrate_corepos(config):
|
if integrate_corepos(config):
|
||||||
config.setdefault('rattail', 'model', 'theo.db.model_corepos')
|
config.setdefault('rattail', 'model', 'theo.db.model_corepos')
|
||||||
|
config.setdefault('rattail', 'settings', 'theo.appsettings.theo')
|
||||||
config.setdefault('rattail.mail', 'emails', 'theo.emails.theo, theo.emails.corepos')
|
config.setdefault('rattail.mail', 'emails', 'theo.emails.theo, theo.emails.corepos')
|
||||||
config.setdefault('rattail.importing', 'versions.handler', 'theo.importing.versions_corepos:FromTheoToTheoVersions')
|
config.setdefault('rattail.importing', 'versions.handler', 'theo.importing.versions_corepos:FromTheoToTheoVersions')
|
||||||
|
|
||||||
# do we integrate w/ Catapult?
|
# do we integrate w/ Catapult?
|
||||||
elif integrate_catapult(config):
|
elif integrate_catapult(config):
|
||||||
config.setdefault('rattail', 'model', 'theo.db.model_catapult')
|
config.setdefault('rattail', 'model', 'theo.db.model_catapult')
|
||||||
|
config.setdefault('rattail', 'settings', 'theo.appsettings.theo, theo.appsettings.catapult')
|
||||||
config.setdefault('rattail.mail', 'emails', 'theo.emails.theo, theo.emails.catapult')
|
config.setdefault('rattail.mail', 'emails', 'theo.emails.theo, theo.emails.catapult')
|
||||||
config.setdefault('rattail.importing', 'versions.handler', 'theo.importing.versions_catapult:FromTheoToTheoVersions')
|
config.setdefault('rattail.importing', 'versions.handler', 'theo.importing.versions_catapult:FromTheoToTheoVersions')
|
||||||
|
|
||||||
# do we integrate w/ LOC SMS?
|
# do we integrate w/ LOC SMS?
|
||||||
elif integrate_locsms(config):
|
elif integrate_locsms(config):
|
||||||
config.setdefault('rattail', 'model', 'theo.db.model_locsms')
|
config.setdefault('rattail', 'model', 'theo.db.model_locsms')
|
||||||
|
config.setdefault('rattail', 'settings', 'theo.appsettings.theo')
|
||||||
config.setdefault('rattail.mail', 'emails', 'theo.emails.theo, theo.emails.locsms')
|
config.setdefault('rattail.mail', 'emails', 'theo.emails.theo, theo.emails.locsms')
|
||||||
config.setdefault('rattail.importing', 'versions.handler', 'theo.importing.versions_locsms:FromTheoToTheoVersions')
|
config.setdefault('rattail.importing', 'versions.handler', 'theo.importing.versions_locsms:FromTheoToTheoVersions')
|
||||||
|
|
||||||
else: # no integration
|
else: # no integration
|
||||||
|
config.setdefault('rattail', 'settings', 'theo.appsettings.theo')
|
||||||
config.setdefault('rattail.mail', 'emails', 'theo.emails.theo')
|
config.setdefault('rattail.mail', 'emails', 'theo.emails.theo')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue