Dashboards of users logged in using Django admin user

Asked

Viewed 249 times

-1

Good Morning I am using Django’s standard user model, and I would like to have a Dashboard of logged in users, to check who is using the system, know me inform if Django has this information?

I checked that they have a table of sessions but this all encrypted.

Thanks in advance

2 answers

1

That I see can do this in two ways:

  1. Save some customer information currently active in the database
  2. 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 such as Loggin and logout
  • Link to an example of the functionality you want to run (Note: Example of code not so recent. You may need to make changes to the code version): Example of Django Signals

2nd Option

Javascript currently provides API’s for applications that require functionality that communicate in real time and may be another possibility to solve your problem by doing some checking when the user logs in and javascript communicates it to the backend.

1


It is an asynchronous method, you can register in a template both the login as to the logout user, saving this information before calling the functions login() (records that the user has entered) and logout() (records that users have left) during the authentication process.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.