﻿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
9901	Problem with url tag	patrick	nobody	"Hi, I've a problem with the url tag, when I call this template from a view:
{{{
<a href=""{% url show_worksheet worksheet.number %}"">Visualizza</a>
}}}

I get this error:
{{{
Caught an exception while rendering: Reverse for
'catsnc.show_worksheet' with arguments '(5537,)' and keyword arguments
'{}' not found.
}}}

But when I call this code from the shell:
{{{
>>> from django.core.urlresolvers import reverse
>>> reverse('show_worksheet', args=(5537,))
}}}

I get the url:
{{{
'/riparazioni/foglio/5537/'
}}}

or:
{{{
>>> from django.template import Template, Context
>>> from reparations.models import WorkSheet
>>> w = WorkSheet.objects.get(pk=1)
>>> c = Context({ 'w': w })
>>> t = Template(""{% url show_worksheet w.number  %}"")
>>> t.render(c)
}}}

I get:
{{{
u'/riparazioni/foglio/5537/'
}}}

could you help me to resolve this problem?

Thanks :) "		closed	HTTP handling	1.0		duplicate			Unreviewed	0	0	0	0	0	0
