beat.web.utils.management.commands.list_active_users module

beat.web.utils.management.commands.list_active_users.get_current_users()[source]

Get the list of users active on the site.

Works better if the configuration of the site has:

SESSION_EXPIRE_AT_BROWSER_CLOSE = True

Inspired from: https://www.codingforentrepreneurs.com/blog/django-tutorial-get-list-of-current-users/

class beat.web.utils.management.commands.list_active_users.Command(stdout=None, stderr=None, no_color=False)[source]

Bases: django.core.management.base.BaseCommand

help = 'Get active users'
add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.