Number of visitors in Django
django, python
Solution
You might want to look into something like django-tracking for this.
django-tracking is a simple attempt at keeping track of visitors to Django-powered Web sites. It also offers basic blacklisting capabilities.
Edit: As for your updated question... [Answer redacted after being corrected by muhuk]
Alternatively, I liked the response to this question: How do I find out total number of sessions created i.e. number of logged in users?
You might want to try that instead.
Problem
In Django, how can I see the number of current visitors? Or how do I determine the number of active sessions? Is this a good method? use django.contrib.sessions.models.Session, set the expiry time short. Every time when somebody does something on the site, update expiry time. Then count the number of sessions that are not expired.