You can have a field called "total_votes" in the Book model.

Then you can override the save() method in the Vote class, which calculates
the total votes on a particular Book  and updates the "total_votes" in the
book.

Also, why not use https://github.com/brosner/django-voting Django-voting
app? It is pretty slick and gives you all those manager methods right away.

-- 
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