Convert mako directories to list, if it's a string
so we can push a new path to it, for sake of theme
This commit is contained in:
parent
c1a2bb978c
commit
e943a1cd44
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue