To use and configure DjangoTemplate externally of Django itselt, independently of settings.py and all other stuff, instead of using Template object it's much better to instantiate own Engine with settings (settings are similar to settings.py). Example below:
This way, you can configure your own engine in the place you need with settings you want (I put custom loader, for example) and even reconfigure it on the fly.
понедельник, 17 августа 2015 г.
Using DjangoTemplates independently
Ярлыки:
django
,
djangotemplates
,
programming
,
python
,
templates
Подписаться на:
Комментарии к сообщению
(
Atom
)
Комментариев нет
Отправить комментарий