﻿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
20423	Template renderer does not parse numeric variables	antonio@…	Tim McCurrach	"Currently a Variable is defined, according to the django template [https://docs.djangoproject.com/en/dev/ref/templates/api/ manual], as :

Variable names consist of any combination of alphanumeric characters and the underscore (""_"").

If a variable is composed of numbers only, it will not get its context data correctly, coming across as an int. This patch assigns the appropriate context data to the Variable class when it encounters an integer.

Here's the current behavior:

from django.template.base import Template
from django.template.base import Context
t = Template(""{{ 123 }}"")
t.render(Context())

u'123'

t = Template(""{{ foo }}"")
t.render(Context({""foo"":""bar""}))

u'bar'"	Cleanup/optimization	closed	Documentation	dev	Normal	fixed	number variable		Accepted	1	0	0	0	0	0
