Changes between Initial Version and Version 1 of Ticket #29785
- Timestamp:
- Sep 22, 2018, 8:50:49 PM (6 years ago)
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.1 Using calling `render()` with no context on a template that uses `{{ csrf_token }}` results in an exception being thrown. 2 2 3 3 I believe the appropriate fix is to change: 4 4 5 if "CSRF_COOKIE" not in request.META: 5 `if "CSRF_COOKIE" not in request.META:` 6 6 7 7 to: 8 8 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:` 10 10 11 11 I am happy to create a PR for this issue once I know it is a desired fix.