#10751: Admin actions not calling model's delete() method
---------------------------------------------+------------------------------
          Reporter:  msurdi                  |         Owner:  nobody
            Status:  new                     |     Milestone:  1.2   
         Component:  django.contrib.admin    |       Version:  SVN   
        Resolution:                          |      Keywords:        
             Stage:  Design decision needed  |     Has_patch:  0     
        Needs_docs:  0                       |   Needs_tests:  0     
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Changes (by anonymous):

 * cc: gonz (removed)
 * cc: yo...@aureal.pe (added)

Comment:

 the problem is not with the delete method, is with the delete action from
 the admin panel when i enable actions for a model.

 the problem is that the action never come to {{{ contrib/admin/actions.py
 }}}

 the problem is in {{{ contrib/admin/options.py:701 }}} in the {{{
 response_action }}} method

 the problem is that when u call to confirm the action, the request.POST
 method don't have the 'index' key.

 i change the line 701 from
 {{{
         if 'index' not in request.POST:
 }}}

 to
 {{{
         if 'index' not in request.POST and 'post' not in request.POST:
 }}}

 and the problem get corrected

 btw, this litle fix correct another serious bug related to this, if i for
 example use a modelform with editable_fields and use the actions then when
 i confirm the bug, for some dark magic code in django that get in another
 dimension in the code, i obtain an strange exception:

 {{{
 [u'ManagementForm data is missing or has been tampered with']
 }}}

 the fix above correct this bug too

 i put this one here to some django coder attend this, the fix is very
 little and correct and severe problem that need to be fixed before 1.2
 release

 sorry if i post this anonymous i dont have time now, i need to take a bus
 in a few minutes and find the bug in an app that i am coding with django
 trunk code

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10751#comment:13>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to