Mercurial > public > sg101
diff gpp/core/models.py @ 423:3fe60148f75c
Fixing #203; use Redis for who's online function.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 23 Apr 2011 19:19:38 +0000 |
parents | dcc929973bba |
children |
line wrap: on
line diff
--- a/gpp/core/models.py Thu Apr 21 02:23:34 2011 +0000 +++ b/gpp/core/models.py Sat Apr 23 19:19:38 2011 +0000 @@ -7,24 +7,6 @@ from django.contrib.auth.models import User -class UserLastVisit(models.Model): - """ - This model represents timestamps indicating a user's last visit to the - site. - """ - user = models.ForeignKey(User, unique=True) - last_visit = models.DateTimeField(db_index=True) - - -class AnonLastVisit(models.Model): - """ - This model represents timestamps for the last visit from non-authenticated - users. - """ - ip = models.CharField(max_length=16, db_index=True, unique=True) - last_visit = models.DateTimeField(db_index=True) - - class Statistic(models.Model): """ This model keeps track of site statistics. Currently, the only statistic @@ -37,6 +19,6 @@ max_anon_users_date = models.DateTimeField() def __unicode__(self): - return u'%d users on %s' % (self.max_users, + return u'%d users on %s' % (self.max_users, self.max_users_date.strftime('%Y-%m-%d %H:%M:%S'))