1 from django.db import models
2 from django.contrib.auth.models import User
4 class ServiceTicket(models.Model):
5 user = models.ForeignKey(User)
6 service = models.URLField(verify_exists=False)
7 ticket = models.CharField(max_length=256)
8 created = models.DateTimeField(auto_now=True)
10 def __unicode__(self):
11 return "%s (%s) - %s" % (self.user.username, self.service, self.created)
13 class LoginTicket(models.Model):
14 ticket = models.CharField(max_length=32)
15 created = models.DateTimeField(auto_now=True)
17 def __unicode__(self):
18 return "%s - %s" % (self.ticket, self.created)