Search posts, tags, users, and pages
If you ever come across a situation where you need to track the changes in the database for auditing purposes or to make the history of all changes in the database. This kind of requirement often comes when we need to adhere to some kind of regulatio...
Sagar Kaurav
@sagarkaurav · India
Software engineer
I am a software engineer with 3 years of experience working for startups
Markdown supported · ⌘↵ to post
Bijay Shrestha
Great work. I got stock in one thing. How can I make model_name name dynamic so that this function is useable for other model also. Thank for your work.
you can you instance.__class__.__name__ or you can use User.__name__
instance.__class__.__name__
User.__name__
Thank you Sagar Kaurav. It was very helpful.
Bijay Shrestha
Great work. I got stock in one thing. How can I make model_name name dynamic so that this function is useable for other model also. Thank for your work.