Changes between Initial Version and Version 1 of Ticket #29785


Ignore:
Timestamp:
Sep 22, 2018, 8:50:49 PM (6 years ago)
Author:
jeffrey k eliasen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29785 – Description

    initial v1  
    1 Using calling `render()` with no context on a template that uses {{ csrf_token }} results in an exception being thrown.
     1Using calling `render()` with no context on a template that uses `{{ csrf_token }}` results in an exception being thrown.
    22
    33I believe the appropriate fix is to change:
    44
    5     if "CSRF_COOKIE" not in request.META:
     5`if "CSRF_COOKIE" not in request.META:`
    66
    77to:
    88
    9     if not request or not request.META or "CSRF_COOKIE" not in request.META:
     9`if not request or not request.META or "CSRF_COOKIE" not in request.META:`
    1010
    1111I am happy to create a PR for this issue once I know it is a desired fix.
Back to Top