Hi, You can try something like the following;
from datetime import datetime, timedelta from django.contrib.auth.models import User half_hour_ago = datetime.today() - timedelta(minutes=30) User.objects.filter(last_login__lt=half_hour_ago) Cheers http://bulkan-evcimen.com On Mon, Mar 4, 2013 at 3:49 AM, frocco <[email protected]> wrote: > I want to list users currently on our site. > Would I use the last login date time? > > If so, what should the query look like? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.

