I think what you’re really looking for is an audit log. There are some Django packages available that do that automatically.
You might find this one quite helpful, called Django Reversion:
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/ef59e00a-3354-44f5-9c99-5ca85885026e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I think what you’re really looking for is an audit log. There are some Django packages available that do that automatically.
You might find this one quite helpful, called Django Reversion:
https://github.com/etianen/django-reversion
From: django...@googlegroups.com [mailto:django...@googlegroups.com] On Behalf Of mickae...@gmail.com
Sent: Tuesday, June 12, 2018 12:22 PM
To: Django users
Subject: Newbie : Best data archive strategy
Hi,
I'd like to archive some data.
I came with this idea :
class DataModel(models.Model):xxx
class DataModelArchive(DataModel):pass
The DataModelArchive database created has only "a pointer" to DataModel.
I saw a post indicating that I'll have to first create an AbstractDataModel and inherit for it for both DataModelArchive and DataModel.
Well, what is the "best way" to archive data using Django ?
Thx for your attention
Micka
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to djang...@googlegroups.com.
Hi Mickael,
It saves a copy of each record every time a record is changed. But it is saved in a separate table, so it doesn’t change your model’s table.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/86e18583-0376-43f2-8419-b557459b5ca7%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/86e18583-0376-43f2-8419-b557459b5ca7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/148f20f481e5409a833ea043f771cbda%40ISS1.ISS.LOCAL.
--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/bV_Wf8qanvQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJ8iCyNj%2B9Q8%2BNJaE5hP9CFgFJhyjFgh-SMZZ1RPm9tYO%2BaczA%40mail.gmail.com.