#15522: delete_model on admin delete action
-------------------------------------+-------------------------------------
               Reporter:  Divad      |        Owner:  nobody
                 Status:  reopened   |    Milestone:
              Component:             |      Version:  SVN
  django.contrib.admin               |     Keywords:  delete_model
             Resolution:             |    Has patch:  1
           Triage Stage:             |  Needs tests:  0
  Unreviewed                         |
    Needs documentation:  0          |
Patch needs improvement:  0          |
-------------------------------------+-------------------------------------
Changes (by Divad <david@…>):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 I have defined historic models with three states Current / Changed /
 Deleted, t\
 agged with user and timestamp of operation.
 so i have defined "delete_model" as:

 {{{
     def delete_model(self, request, obj):
         obj.user = request.user
         super(HistoricModelAdmin,self).delete_model(request, obj)
 }}}

 this allows to track the user who deletes an object.

 On the other end when bulk delete is triggered with delete action, I do
 not kno\
 w the user who triggered the action, resulting in two different results.

 I suppose there could be other users unaware of this two different results
 to t\
 he same action.

 But someone could argue that I should define my own delete action instead
 of us\
 ing the default one.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15522#comment:3>
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 [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-updates?hl=en.

Reply via email to