On 12 déc, 18:15, Baurzhan Ismagulov <[email protected]> wrote:
> Hello,
>
> Another named URL question. I have the following pattern:
>
> (r'^app/(?P<object_id>\d+)/$', create_update.update_object,
> {'model': App}, 'app-edit'),
>
> Now, using {% url 'app-edit' object.pk %} in a form throws
> TemplateSyntaxError, mentioning "NoReverseMatch: Reverse for
> 'rc.'app-edit'' with arguments '(1,)' and keyword arguments '{}' not
> found."
The above url works with a named (aka 'keyword') param 'object_id', so
you do have to use the same scheme withing the url tag, ie:
{% url 'app-edit' object_id=object.pk %}
HTH
--
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.