Changes between Initial Version and Version 1 of Ticket #9901
- Timestamp:
- Dec 22, 2008, 11:16:19 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9901 – Description
initial v1 1 1 Hi, I've a problem with the url tag, when I call this template from a view: 2 {{{<a href="{% url show_worksheet worksheet.number %}">Visualizza</a>}}} 2 {{{ 3 <a href="{% url show_worksheet worksheet.number %}">Visualizza</a> 4 }}} 5 3 6 I get this error: 4 {{{Caught an exception while rendering: Reverse for 7 {{{ 8 Caught an exception while rendering: Reverse for 5 9 'catsnc.show_worksheet' with arguments '(5537,)' and keyword arguments 6 10 '{}' not found. 7 11 }}} 12 8 13 But when I call this code from the shell: 9 {{{>>> from django.core.urlresolvers import reverse 14 {{{ 15 >>> from django.core.urlresolvers import reverse 10 16 >>> reverse('show_worksheet', args=(5537,)) 11 17 }}} 18 12 19 I get the url: 20 {{{ 13 21 '/riparazioni/foglio/5537/' 22 }}} 14 23 15 24 or: … … 20 29 >>> c = Context({ 'w': w }) 21 30 >>> t = Template("{% url show_worksheet w.number %}") 22 >>> t.render(c) }}} 31 >>> t.render(c) 32 }}} 33 23 34 I get: 35 {{{ 24 36 u'/riparazioni/foglio/5537/' 25 37 }}} 26 38 27 39 could you help me to resolve this problem?