dominno / django-moderation

django-moderation is reusable application for Django framework, that allows to moderate any model objects.
BSD 3-Clause "New" or "Revised" License
269 stars 91 forks source link

Keep Moderation History #111

Closed SamTShaw closed 10 years ago

SamTShaw commented 10 years ago

Add an option to GenericModerator that controls whether history of moderated objects should be kept or not.

Add a new "date_updated" field to ModeratedObject so that we can determine what the latest object is. When keeping history there's no other way of uniquely finding the latest ModeratedObject. Migration file is also provided.

Update ModerationObjectManager.get_for_instance to try and get the moderated object the old way, and if there are many (because keep_history = True), find the most recent one and return that.

Added a test to make sure the post save handler works with keep_history Added a test for ModeratedObjectManager to test get_for_instance

dominno commented 10 years ago

Hi @Moustacha

Could you also add some info about this to the docs ?

Thx

dominno commented 10 years ago

Also what about any admin integration that will show that history ?

SamTShaw commented 10 years ago

I'll add some documentation on how to use it, what to expect, etc.

The admin panel will show multiple moderations. If you go to one moderation it won't show others in the chain, as the functionality around the admin panel hasn't changed. But you will be able to see all the other moderations because it's simply just another row.

On 18 June 2014 20:05, Dominik Szopa notifications@github.com wrote:

Also what about any admin integration that will show that history ?

— Reply to this email directly or view it on GitHub https://github.com/dominno/django-moderation/pull/111#issuecomment-46427055 .

SamTShaw commented 10 years ago

This should be ready for merging now