Using Django's templating engine without the rest of Django Using Django's templating engine without the rest of Django django django

Using Django's templating engine without the rest of Django


I'd recommend using Jinja2 instead of Django templates as a standalone solution.


Have you tried to use this?

settings.configure(TEMPLATE_DIRS=('.',))

Since the templates are in the same directory as the python code, this should be enough for the loader to find the template.


In order for the loader to find your templates; you need to have the directory where the templates are located in your TEMPLATE_DIRS tuple in settings.py. By default django will search for a templates directory inside an application so if you don't have an application registered; django cannot find templates.

If you are after a "django like" template engine, jinja is very close to django's syntax and is completely self-contained, you won't run into unexpected issues as you are facing now.