Export to GitHub

django-modelvcs - Features.wiki


Features

  • should work with the latest django trunk and without any external patches
  • You must not change/edit your own models, simple register your models with ModelVCS
  • Used threadlocals middleware (builtin) like: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
  • Used django.contrib.admin.models.LogEntry for logging

How it works

Every model witch is registered via modelvcs.signal_handler.register() would be send signals to the signal handler defined in modelvcs.signal_handler.

If a model entry would be saved (called the save() method of you model), we create a new entry in django LogEntry with these addition information:

  • messages - optional SaveMessages
  • diff_data - a pformat string with every changes data informations
  • stack_info - in witch file + line number + method was model save() called?

In the django admin panel you can look into the history of a model entry. Also we add the django LogEntry model to the admin panel.