SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы
Список вопросов ПечатьМетки: kallithea turbogears python mako
| RemiZOffAlex Создано: 2021-10-15 21:22:29.283239 Обновлено: 2021-10-15 21:22:29.283239 |
|---|
|
Файл kallithea/config/app_cfg.py base_config = FullStackApplicationConfigurator()
from .mako_custom import MakoCustomRenderer
base_config.get_component('rendering').register_engine(MakoCustomRenderer)
...
base_config.update_blueprint({
# Rendering Engines Configuration
'renderers': [
'json',
'mako',
'mako-custom',
],
...
Файл kallithea/controllers/base.py def render(template_path):
return render_template({'url': url}, 'mako-custom', template_path)
|