Django2.0 jinja2 static and template configuration

In

DTL mode, you can put templates and static files in the corresponding directory under each app, but when using jinja2, although the APP_DIRS=True jinja2 in the setting file still won"t find the corresponding directory in APP, it will only find the top-level directory. For example, when I use django-debug-toolbar, it will only find templates and static files in the top-level directory. How should I configure it?

Mar.20,2021

create a templatetags module in app, configure the current app, in settings, or django cannot find a custom simple_tag
'environment':' DjangoDemo.jinja2_env.environment' (configuration file)

Menu