From e943a1cd44307071bef631e53af7932600d4b77e Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 24 Jun 2020 11:36:58 -0500 Subject: [PATCH] Convert mako directories to list, if it's a string so we can push a new path to it, for sake of theme --- tailbone/app.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tailbone/app.py b/tailbone/app.py index 810d502c..44d9976f 100644 --- a/tailbone/app.py +++ b/tailbone/app.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2018 Lance Edgar +# Copyright © 2010-2020 Lance Edgar # # This file is part of Rattail. # @@ -29,10 +29,11 @@ from __future__ import unicode_literals, absolute_import import os import warnings +import six import sqlalchemy as sa from sqlalchemy.orm import sessionmaker, scoped_session -from rattail.config import make_config +from rattail.config import make_config, parse_list from rattail.exceptions import ConfigurationError from rattail.db.types import GPCType @@ -161,8 +162,13 @@ def establish_theme(settings): theme = get_effective_theme(rattail_config) settings['tailbone.theme'] = theme + directories = settings['mako.directories'] + if isinstance(directories, six.string_types): + directories = parse_list(directories) + path = get_theme_template_path(rattail_config) - settings['mako.directories'].insert(0, path) + directories.insert(0, path) + settings['mako.directories'] = directories def configure_postgresql(pyramid_config):