#25094: Jinja2 backend requires settings to be configured
-------------------------------------+-------------------------------------
     Reporter:  jaap3                |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Template system      |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  jinja2 cache         |             Triage Stage:
  backend                            |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by jaap3):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 The dependency on the settings is a side effect of importing
 `template.backends.utils.csrf_input_lazy` triggering the the import of
 `middleware.csrf.get_token` then `utils.cache.patch_vary_headers` and
 finally `core.cache.caches`.

 Moving `get_token` (and maybe `rotate_token`) to a new module (maybe
 `django.utils.csrf`?) would solve this. `get_token` is imported from at
 various places throughout the Django codebase.

--
Ticket URL: <https://code.djangoproject.com/ticket/25094#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.bbb95bdb3aced6692edd724fd3c967f3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to