gremmie@1: """ bgneal@37: This file contains the core Models used in gpp gremmie@1: """ bgneal@227: from django.db import models bgneal@227: from django.contrib import auth gremmie@1: bgneal@227: bgneal@227: class UserLastVisit(models.Model): bgneal@227: """ bgneal@227: This model represents timestamps indicating a user's last visit to the bgneal@227: site. bgneal@227: """ bgneal@227: user = models.ForeignKey(auth.models.User, unique=True) bgneal@227: last_visit = models.DateTimeField(db_index=True) bgneal@227: bgneal@227: bgneal@227: class AnonLastVisit(models.Model): bgneal@227: """ bgneal@227: This model represents timestamps for the last visit from non-authenticated bgneal@227: users. bgneal@227: """ bgneal@227: ip = models.CharField(max_length=16, db_index=True, unique=True) bgneal@227: last_visit = models.DateTimeField(db_index=True) bgneal@227: