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):