1 from django.db import models
2 from django.contrib.auth.models import User
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)
11 def __unicode__(self):
12 return "%s (%s) - %s" % (self.user.username, self.service, self.created)
15 class LoginTicket(models.Model):
16 ticket = models.CharField(max_length=32)
17 created = models.DateTimeField(auto_now=True)
19 def __unicode__(self):
20 return "%s - %s" % (self.ticket, self.created)