tags:

views:

44

answers:

1

when i use the django generic update_object view to edit always

 Page not found (404) Request Method:
 POST Request URL:
 http://127.0.0.1:8000/bookmarks/edit/

my url.py

(r'^edit/(?P<object_id>\d+)$',
                         update_object,
                         {'form_class':BookForm,
                          'post_save_redirect':'/',
                          'queryset':Book.objects.all()
                          }),

my template:

<form action="." method="POST">
{{form.as_p}}
<p>
<input type="submit" name="submit" value="Next→" /></button>
</p>
</form>

who can tell me why?

+1  A: 

try this:

r'^edit/(?P<object_id>\d+)$'
nbv4