Under the existing system, a log audit needs to be added.
Existing environment: Django Mongodb.
Then I want to use logging directly to process logs, but how to store them in the database?
I saw some people discussing signals processing on the Internet. I am not very familiar with this block. I would like to ask if it is okay to only process views, because the existing environment does not have the processing of models. Thanks
Write a decorator? If model is not used
If you want to record changes in models, it is recommended to use django-reversion.
Update:
You can redirect the user to the view you use to record the user's login time, IP, and username after logging in. Then redirect to another view.