On Tue, Jun 16, 2009 at 02:07:01AM -0700, Bastien wrote:
> I don't understand how this works, on my url without arguments I can
> use the template tag {% url ... %} and it just works but as soon as I
> have an argument like this one:
>
> url(r'^users/(?P<username>.+)/comments/$',
> view=public_comments,
> name='public_comments'),
>
> and I call it via:
>
> {% url public_comments args=user.username %}
>
> then I get :
>
> Caught an exception while rendering: Reverse for public_comments' with
> arguments '()' and keyword arguments '{'args': u'my_name'}' not found.
I haven't double checked, but I think that should read:
{% url public_comments user.username %}
or
{% url public_comments username=user.username %}
--
Brian May <[email protected]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---