Changed the CAS Protocol! A 'yes' or 'no' first line followed with the user is still...
[django-cas-provider.git] / cas_provider / models.py
1 from django.db import models
2 from django.contrib.auth.models import User
3
4
5 class ServiceTicket(models.Model):
6     user = models.ForeignKey(User)
7     service = models.URLField(verify_exists=False)
8     ticket = models.CharField(max_length=256)
9     created = models.DateTimeField(auto_now=True)
10     
11     def __unicode__(self):
12         return "%s (%s) - %s" % (self.user.username, self.service, self.created)
13
14
15 class LoginTicket(models.Model):
16     ticket = models.CharField(max_length=32)
17     created = models.DateTimeField(auto_now=True)
18     
19     def __unicode__(self):
20         return "%s - %s" % (self.ticket, self.created)