7
7
7761662017-07-25 20:30:46
Django
776166, 2017-07-25 20:30:46

How to properly set match_regex for partial jinja2 in django?

It is necessary to route only /auth/* and /soauth/* through django_jinja.backend.Jinja2 , and pass the rest through django.template.backends.django.DjangoTemplates
The problem is that match_regex somehow does not really want to work.
The option doesn't work. What is wrong and how should it be? If anything, then this is python-social-auth from the example. PS Do not offer to translate everything to jinja2. UPD: If you get involved in the file extension, it works well without regularization. For me this is enough. But I want to understand and not forgive.
"match_regex": r"^(auth|oauth)/.*",

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question