Include email settings specific to Catapult mirror
This commit is contained in:
parent
a290e8af93
commit
c707e2261c
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
|
|
||||||
[theo]
|
[theo]
|
||||||
|
|
||||||
|
## POS integration
|
||||||
% if env.theo_integrates_with == 'corepos':
|
% if env.theo_integrates_with == 'corepos':
|
||||||
integrate_corepos = true
|
integrate_corepos = true
|
||||||
% elif env.theo_integrates_with == 'catapult':
|
% elif env.theo_integrates_with == 'catapult':
|
||||||
|
@ -16,6 +18,9 @@ integrate_catapult = true
|
||||||
integrate_locsms = true
|
integrate_locsms = true
|
||||||
% endif
|
% endif
|
||||||
|
|
||||||
|
## POS DB mirror
|
||||||
|
mirror_posdb = ${'true' if env.theo_mirror_posdb else 'false'}
|
||||||
|
|
||||||
|
|
||||||
## begin corepos
|
## begin corepos
|
||||||
% if env.theo_integrates_with == 'corepos':
|
% if env.theo_integrates_with == 'corepos':
|
||||||
|
|
|
@ -52,7 +52,10 @@ class TheoConfig(ConfigExtension):
|
||||||
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', 'settings', 'theo.appsettings.theo, theo.appsettings.catapult')
|
||||||
config.setdefault('rattail.mail', 'emails', 'theo.emails.theo, theo.emails.catapult')
|
emails = ['theo.emails.theo', 'theo.emails.catapult']
|
||||||
|
if mirror_posdb(config):
|
||||||
|
emails.append('theo.emails.catapult_mirror')
|
||||||
|
config.setdefault('rattail.mail', 'emails', ', '.join(emails))
|
||||||
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?
|
||||||
|
@ -80,3 +83,8 @@ def integrate_corepos(config):
|
||||||
def integrate_locsms(config):
|
def integrate_locsms(config):
|
||||||
return config.getbool('theo', 'integrate_locsms', default=False,
|
return config.getbool('theo', 'integrate_locsms', default=False,
|
||||||
usedb=False)
|
usedb=False)
|
||||||
|
|
||||||
|
|
||||||
|
def mirror_posdb(config):
|
||||||
|
return config.getbool('theo', 'mirror_posdb', default=False,
|
||||||
|
usedb=False)
|
||||||
|
|
29
theo/emails/catapult_mirror.py
Normal file
29
theo/emails/catapult_mirror.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# -*- 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 email profile settings
|
||||||
|
"""
|
||||||
|
|
||||||
|
from rattail_onager.emails import (
|
||||||
|
rattail_onager_import_catapult_updates,
|
||||||
|
)
|
Loading…
Reference in a new issue