How do I use Django templates without the rest of Django?

后端 未结 13 1095
天命终不由人
天命终不由人 2020-11-29 16:17

I want to use the Django template engine in my (Python) code, but I\'m not building a Django-based web site. How do I use it without having a settings.py file (and others)

13条回答
  •  我在风中等你
    2020-11-29 17:00

    I echo the above statements. Jinja 2 is a pretty good superset of Django templates for general use. I think they're working on making the Django templates a little less coupled to the settings.py, but Jinja should do well for you.

提交回复
热议问题