Define custom app settings

This commit is contained in:
Lance Edgar 2020-09-20 17:23:55 -05:00
parent a26e3088c5
commit b0eb941044
2 changed files with 48 additions and 0 deletions

45
theo/appsettings.py Normal file
View file

@ -0,0 +1,45 @@
# -*- 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
"""
# bring in some common settings from rattail
from rattail.settings import (
# (General)
rattail_app_title,
tailbone_background_color,
# # DataSync
# rattail_datasync_url,
# tailbone_datasync_restart,
# Mail
rattail_mail_record_attempts,
# Products
rattail_product_key,
rattail_product_key_title,
tailbone_products_show_pod_image,
)

View file

@ -41,6 +41,9 @@ class TheoConfig(ConfigExtension):
# Theo comes with its own menu for web app
config.setdefault('tailbone', 'menus', 'theo.web.menus')
# custom App Settings
config.setdefault('rattail', 'settings', 'theo.appsettings')
# do we integrate w/ CORE-POS?
if integrate_corepos(config):
config.setdefault('rattail', 'model', 'theo.db.model_corepos')