django - Database change history -


i'm searching django package allow me save history of models, on updates. found django-reversion, after quick doesn't seem have such ability. database triggers not option, since database structure rather complicated, , writing them hard.

i had same problem @ point.

my solution @ time define 2 models:

  • content: corresponds abstraction of content of website. model holds current content of website.
  • action: corresponds abstraction of content change on website.

content has 2 pointers (onetoonefield) actions: first edit, action created particular content , last edit, action has last modification made on content.

action has 1 pointer (onetoonefield) actor, user made action, , pointer (foreignfield) action, previous action on particular content. has textfield saves content change. can instance diff-like text databases, or pickled dictionary.

in sense equivalent version control git, "action" commit on specific content (and not on whole project), , content source. commits linked via "previous commit", , save content change , user.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -