I have various models of which I would like to keep track and collect statistical data.
The problem is how to store the changes throughout time.
I thought of various alternative:
What are your suggestions?
Don't reinvent the wheel.. Use django-reversion for logging changes.
I'd break statistics off into a separate model though.
Quoth my elementary chemistry teacher: "If you don't write it down, it didn't happen", therefore save logs in a file.
Since the log information is disjoint from your application data (it's meta-data, actually), keep them separate. You could log to a database table but it should be distinct from your model.
Text pickle data is difficult for humans to read, binary pickle data even more so; log in an easily parsed format and the data can be imported into analysis software easily.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With