Re: How send data to UpdateView from javascript. (Django 1.5)

2013-06-09 Thread Ariel V. R.
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

Re: How send data to UpdateView from javascript. (Django 1.5)

2013-06-07 Thread Nikolas Stevenson-Molnar
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

Re: How send data to UpdateView from javascript. (Django 1.5)

2013-06-06 Thread Ariel V. R.
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