On Mon, Mar 4, 2013 at 1:02 PM, frocco <[email protected]> wrote:
> ok, do you have a better idea on how I might do this?
> user is used to seeing this from a PHP site that I am porting.
>

I use this at the shell sometimes:

from django.contrib.auth.models import User
for user in User.objects.order_by('-last_login')[:25].iterator():
    print user.username.ljust(20, ' '), user.get_full_name().ljust(30,
' '), user.last_login

Just alter the queryset to use a timedelta query for last_login
instead of a row limit. Shouldn't be a big load on the system.

-- 
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.


Reply via email to