﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24538	Rendering a Jinja template with a context containing 'self' fails	Tim Heap	Simon Charette	"Rendering a DTL template with a context containing a 'self' key works. Attempting the same with a Jinja template fails:

{{{
from django.shortcuts import render


def self_test(request):
    # Assuming that there exists a DTL style template 'dtl.html',
    # and a Jinja template named 'jinja.html':
    render(request, 'dtl.html', {'self': 'test'})  # Works
    render(request, 'jinja.html', {'self': 'test'})   # Fails
}}}

{{{
Internal Server Error: /self_test/
Traceback (most recent call last):
  File ""/home/vagrant/jinjatest_venv/local/lib/python2.7/site-packages/django/core/handlers/base.py"", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File ""/vagrant/jinjatest/views.py"", line 6, in self_test
    render(request, 'jinja.html', {'self': 'test'})
  File ""/home/vagrant/jinjatest_venv/local/lib/python2.7/site-packages/django/shortcuts.py"", line 67, in render
    template_name, context, request=request, using=using)
  File ""/home/vagrant/jinjatest_venv/local/lib/python2.7/site-packages/django/template/loader.py"", line 99, in render_to_string
    return template.render(context, request)
  File ""/home/vagrant/jinjatest_venv/local/lib/python2.7/site-packages/django/template/backends/jinja2.py"", line 63, in render
    return self.template.render(**context)
TypeError: render() got multiple values for keyword argument 'self'
}}}

The Wagtail CMS uses 'self' as a key when rendering pages. This error means that Wagtail can not be used in combination with Jinja templates.

The contents of the templates is irrelevant, and can be blank for testing."	Bug	closed	Template system	1.8rc1	Release blocker	fixed			Ready for checkin	1	0	0	0	0	0
