#34830: csrf_failure view missing context processors
-----------------------------+------------------------------------
Reporter: Alex Henman | Owner: nobody
Type: Bug | Status: new
Component: CSRF | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Comment (by Alex Henman):
Replying to [comment:7 Natalia Bidart]:
> Replying to [comment:6 Alex Henman]:
> >
> > So I thought the fix was to explicitly pass the `request` rather than
add it to the context dict
>
> My advice would be to try your patch and run the tests :-) (this is what
I did when reproducing/accepting the ticket). Spoiler alert, some tests
fail with:
>
> {{{
> TypeError: Template.render() got an unexpected keyword argument
'request'
> }}}
>
> This is why the `Template` class that is being used is the one defined
in `django/template/base.py` which `render` method is defined as `def
render(self, context)`. I hope this helps!
Ahh I see: sorry I was just trying to help out those who were keen to take
on working on a fix. I don't really have a working Django development
environment set up so haven't been able to test out any of my suggested
changes here.
I think the key thing is that just passing `request` in to the context
might not be enough as for my use case what I want is the context
processors in my configured template backend. That is perhaps not as
simple as I'd hoped then
--
Ticket URL: <https://code.djangoproject.com/ticket/34830#comment:8>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018adc17a17a-ec49afe0-96a5-4c9a-853e-410c8af2e711-000000%40eu-central-1.amazonses.com.