Hello

I was wondering what is the best possible way of maintaning history of
changes to the fields of models.

Like we do in Bug trackers, where we maintain a complete log of
changes to the fields.

One simple solution that came to my mind is creating a model History.
as


class History(models.Model):
    model_changed = models.CharField(maxlength=255, blank=False)
    old_data = models.TextField(blank=False)
    created = models.DateTimeField(auto_now = True)



Then before saving the model objects its old value get pushed in the
History.old_data in json, pickle or some other format. But this is
very bad way to do it. Because generating reports is not a simple task
when using pickled data.

You guys might have faced similar problems, can any one suggest a
better way of maintaining history.

One thig to consider here however is that models  are deeply connected
with lot of relationships between them.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to