On 8/3/2010 5:06 PM, bagheera wrote:
>
> Lets say i have a Person model and a book model. Each Person can have
> many books. Person model have PositiveIntegerField that stores, how many
> books that person has. If new book is added, respective counter is
> incremented, now i want to modify default admin action -
> delete_selected, so it would change values of respective counters, but
> only if i confirm deletion of selected books.
>
> How to override delete_seleted properly?
>
> Sorry for my bad english.
It would be easier if you used the database to count the books each
person has. I presume you have specific efficiency reasons for designing
your database with redundant data in it? ("Yes" Is an acceptable answer
to this question ...)
regards
Steve
--
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en.