User dashboards logged in using django admin user

-2

Good Morning I'm using Django's default user model, and I would like to have a user dashboard logged in, to check who's using the system, can you tell me if django has this information?

I checked that they have a table of sessions but everything is encrypted.

Thank you in advance

    
asked by anonymous 28.09.2018 / 13:25

2 answers

0

It is an asynchronous method, you can register the user in login and the logout of the user, saving this information before calling the login() ( registers that the user entered) and logout() (registers that the user left) during the authentication process.

    
28.09.2018 / 19:15
0

What I see can be done in two ways:

  • Save some information from the currently active clients in the database
  • Use javascript to provide this data in real time
  • 1st Option

    These search links can help you with this:

    • Django Signals - Provides a way to observe certain events like loggin and logout
    • Link to an example of the functionality that you want to run (Note: Code example not so recent. You may need to make changes to the code version): Django Signals example

    2nd Option

    JavaScript currently provides APIs for applications that require real-time communication capabilities and may be another possibility to solve your problem by doing some checking when the user logs in and javascript communicates this to the backend.

    28.09.2018 / 17:06