Opened 8 years ago
Last modified 8 years ago
#28125 closed Cleanup/optimization
Calling render on a Template object passing a dict fails — at Initial Version
Reported by: | Eddie Bragg | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.11 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
According to the release docs for 1.11 any callto render()
on a Template
object you need to pass a dict
https://docs.djangoproject.com/en/1.11/releases/1.11/#django-template-render-prohibits-non-dict-context
I have code that originally passes a Context
object.
Upgrading to 1.11 from 1.10 and changing it to a dict
causes this error 'dict' object has no attribute 'render_context'
Looking at Django code the error occurs at https://github.com/django/django/blob/1.11/django/template/base.py#L203
I believe this code still expects a Context
object.