I know the solution, this appear in the django documentation, but no resolv
my problem. I redefine "dispatch" function in Django 1.4.X,
class MatterUpdateView( UpdateView ):
template_name = 'object_add.html'
success_url = '/manage_p1/list/'
model = Matter
form_class = MatterForm
I assume that MatterUpdateView is a subclass of the generic UpdateView
class. If so, that class expects an object pk (id) or slug to be
included as part of the URL pattern, and yours doesn't include either.
Your URL pattern should look something more like:
r"^manage/(?P\d+)/update/"
_Nik
On 6/6/2
Code:
HTML
JS
$('.icon-edit').click( function() {
$object_id = $(this).parents().eq(0).attr('id');
$('#form-edit #input-pk').attr('value', $object_id);
$('#form-edit').submit();
})
URL.PY
...
url(r'^manage_p1/update/', MatterUpdat
3 matches
Mail list logo