Re: reverse url fails on existing url
thanks!! both works. Bastien On Jun 16, 11:10 am, Brian May wrote: > 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.+)/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 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: reverse url fails on existing url
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.+)/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 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
reverse url fails on existing url
Hello, 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.+)/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. anybody has an idea? thanks, Bastien --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---