The docstring would lead the reader to believe the context isn't optional.
If the caller omits `context`, they will likely get the following
exception:
{{{AttributeError: 'NoneType' object has no attribute 'render_context'}}}
which is due to `Template.render`'s first line being:
{{{
def render(self, context):
with context.render_context.push_state(self):
...
}}}
The signature of `Template.render` would lead me to believe context is not
optional and must be of type `Context`.
--
Ticket URL: <https://code.djangoproject.com/ticket/29960>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* easy: 1 => 0
Comment:
Please give code to reproduce the problem. There are `render_to_string()`
calls in `tests/test_utils/tests.py`, for example, that omit context
without a problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/29960#comment:1>
* status: new => closed
* resolution: => invalid
Comment:
The type of the template that `render_to_string` calls `render` on is
`django.template.backends.django.Template`, not `django.template.Template`
(which was quoted).
Sorry for the noise.
--
Ticket URL: <https://code.djangoproject.com/ticket/29960#comment:2>