I wish to show the consumer the final 10 changes across all my database objects.
I am using django-reversion to trace a brief history of changes to my model objects. I am also somewhat copying this inside a summary view. Where reversion produces a brief history list by object, the summary view just tracks just one list with every alternation in chronological order. Could it be more effective to question with this particular summary list, or could/must i simply query all the reversion tables which are more recent 10 edits across all objects?
Second part: I wish to show a person their edits arranged by object
So let us say a person edited 3 objects 10 occasions each. The consumer edited each object on different days, the like Day 1, the consumer edited all 3, on Day 2, the consumer edited maybe 1 of these, etc. I wish to show the consumer a table that reads the following
Object Date of your most recent edit Date of last edit Object 1 12-24-11 12-25-11 Object 2 12-20-11 12-23-11
In which the second column is easily the most recent user specific edit and also the third column is easily the most recent edit by any user.
I would like the consumer to have the ability to choose Object 1, after which see all their edits for your Object:
Object Date of your most recent edit Date of last edit Object 1 12-24-11 12-25-11 edited name 12-24-11 edited type 12-19-11 edited subject 12-18-11 edited date 12-18-11 edited type 12-16-11 Object 2 12-20-11 12-23-11
How might I structure this question? Probably the most direct way I'm able to think about would be to query the distinct/unique listing of objects strained by user from either the reversion tables or even the summary table, then query reversion by user by object to obtain the more in depth history. This appears like it may be more effective.
Might I wish to create another summary table by user that will track the alterations for simpler querying within this format? Wouldso would I structure that kind of table?
Some code. I make use of this to obtain a listing of all of the history for any given object. It provides me with their email list of versions for any database object, an email by what was edited, the date of edit, and also the user that made the modification:
version_list = Version.objects.get_for_object(object).select_related("revision__user")
And That I simply employ this to obtain a simple listing of edits. Within this summary table, the final 10 records are the newest changes (object, particulars on which was transformed, date, and user):
whats_new_items = WhatsNew.objects.all()[0:10]