while i was reading the docs, i've noticed something and felt like i
should warn you. my suggestion is not the best practice if you are
doing something like
"Model.objects.filter(some_field=some_value).delete()". for deletions
like that you should use pre_delete signal [1].

[1] 
http://docs.djangoproject.com/en/dev/ref/signals/#django.db.models.signals.pre_delete

good luck.

On Apr 14, 3:21 pm, Mengu <whalb...@gmail.com> wrote:
> you can override the delete method for your models and set a column
> ie, is_deleted to True or something else in there. so, subclass
> models.Model, override delete option and your models should extend
> your new subclass.
>
> On Apr 14, 11:51 am, ëq <lamb...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi list,
>
> > We have a production django app using the default admin view, but some of
> > the super users delete a record in a model and affect other related data,
> > this cause inconsistency and corruption. What's the best practice to
> > override django admin's default delete behavior and implement some kind of
> > "Recycle Bin" for models without harassing much the existing code?
>
> > Any idea is appreciated. Thanks in advance!

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

Reply via email to