Json and difflib won't work well together, unless you make a diff per field, which will add overhead. Look at http://stackoverflow.com/questions/4599456/textually-diffing-json
Reverting is returning to a previous state. Just run all diffs from the first commit until you reach the desired state. It would be great that it showed side by side the older an newer values of each field in a table view and let you choose what you want to revert. Maybe text fields on the left, values on the right and a copy button on each side. Don't forget about foreign keys. A reversion might imply restoring a deleted item. On Wednesday, May 9, 2012 3:15:06 PM UTC+2, Alireza wrote: > > Hi > First of all i know there is a plugable app called *django-reversion*, > leave it now! > > I like to discus about some idea to implement a simple reversion app. i > have couple of thoughts about it, all i need is just another people's ideas > about it. > > If i'm wrong correct me! > The model that used to keep history|changes, is a generic model and of > course powered by *ContentType *[framework|app], and revision should be > done in tracking the changes in git way, not svn-like which make a copy of > the changed file. > And of course data should be saved in JSON format, thanks to simple json! > ( using django signals to keep eyes on model changes ) > Different between the models can be handled by *difflib*! > Okay yet theoretically is not a big implementation! > But the main point and important step is reverting, which i don't have > clear idea about it! > And i know i probably missed couple of things there. > > i like to know your [idea|suggestion|advice]! > Thanks! > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/MlKUCZ4hkisJ. 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.