Changes between Initial Version and Version 1 of Ticket #9901


Ignore:
Timestamp:
12/22/2008 11:16:19 AM (6 years ago)
Author:
gwilson
Comment:

fixed description formatting.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9901

    • Property Patch needs improvement unset
    • Property Needs tests unset
    • Property Needs documentation unset
  • Ticket #9901 – Description

    initial v1  
    11Hi, 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
    36I get this error:
    4 {{{Caught an exception while rendering: Reverse for
     7{{{
     8Caught an exception while rendering: Reverse for
    59'catsnc.show_worksheet' with arguments '(5537,)' and keyword arguments
    610'{}' not found.
    711}}}
     12
    813But when I call this code from the shell:
    9 {{{>>> from django.core.urlresolvers import reverse
     14{{{
     15>>> from django.core.urlresolvers import reverse
    1016>>> reverse('show_worksheet', args=(5537,))
    1117}}}
     18
    1219I get the url:
     20{{{
    1321'/riparazioni/foglio/5537/'
     22}}}
    1423
    1524or:
     
    2029>>> c = Context({ 'w': w })
    2130>>> t = Template("{% url show_worksheet w.number  %}")
    22 >>> t.render(c) }}}
     31>>> t.render(c)
     32}}}
     33
    2334I get:
     35{{{
    2436u'/riparazioni/foglio/5537/'
    25 
     37}}}
    2638
    2739could you help me to resolve this problem?
Back to Top