I know Django has a feature of last_modified field (models.DateTimeField(auto_now_add=True)
)..
but let’s say I have a certain App, and I want to know when was the last change for any of its Model (I don’t really care which model was changed, I just want to know when was the latest change for this app..)
do I really have to write a last_modified field for each model (I have 9 of them for the moment…), and then check for each of them which is the latest?
any help will be appreciated 🙂
Thanks
In The End I made a table for constants for my app (actually I had it before for use of other things).
so the Table looks like this:
and added a consant named “version_date”.
Than, I added this code to the bottom of my models.py, to track all changes in all the models in the app.
This way, I don’t need to change my DB Schema.. only need to add the code mentioned.
thanks all