Opened 16 years ago
Closed 16 years ago
#9901 closed (duplicate)
Problem with url tag
Reported by: | patrick | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
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 :)
Change History (5)
comment:1 by , 16 years ago
Description: | modified (diff) |
---|
comment:2 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:3 by , 16 years ago
thanks for the reply, but I couldn't find any error :( and I don't know how to apply the patch (I think the patch is out-to-date, I use django 1.0.2)
comment:4 by , 16 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
nothing, I couldn't find any error :(
could you help me how to apply the patch?
thanks
comment:5 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Closing as a duplicate per Gary's comment above. If you have usage questions, please take them to the django-users mailing list.
fixed description formatting.