Changeset e943a1c in tailbone


Ignore:
Timestamp:
06/24/20 11:36:58 (7 weeks ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
bea6719
Parents:
c1a2bb9
Message:

Convert mako directories to list, if it's a string

so we can push a new path to it, for sake of theme

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tailbone/app.py

    rc1a2bb9 re943a1c  
    33#
    44#  Rattail -- Retail Software Framework
    5 #  Copyright © 2010-2018 Lance Edgar
     5#  Copyright © 2010-2020 Lance Edgar
    66#
    77#  This file is part of Rattail.
     
    3030import warnings
    3131
     32import six
    3233import sqlalchemy as sa
    3334from sqlalchemy.orm import sessionmaker, scoped_session
    3435
    35 from rattail.config import make_config
     36from rattail.config import make_config, parse_list
    3637from rattail.exceptions import ConfigurationError
    3738from rattail.db.types import GPCType
     
    162163    settings['tailbone.theme'] = theme
    163164
     165    directories = settings['mako.directories']
     166    if isinstance(directories, six.string_types):
     167        directories = parse_list(directories)
     168
    164169    path = get_theme_template_path(rattail_config)
    165     settings['mako.directories'].insert(0, path)
     170    directories.insert(0, path)
     171    settings['mako.directories'] = directories
    166172
    167173
Note: See TracChangeset for help on using the changeset viewer.