Siobhan Tully | 4bc09f2 | 2013-04-10 21:15:21 -0400 | [diff] [blame] | 1 | import os |
| 2 | from django.db import models |
| 3 | from plstackapi.core.models import PlCoreBase |
| 4 | from plstackapi.core.models import User |
| 5 | |
| 6 | # Create your models here. |
| 7 | |
| 8 | class Key(PlCoreBase): |
| 9 | name = models.CharField(max_length=256, unique=True) |
| 10 | key = models.CharField(max_length=512) |
| 11 | type = models.CharField(max_length=256) |
| 12 | blacklisted = models.BooleanField(default=False) |
| 13 | user = models.ForeignKey(User, related_name='keys') |
| 14 | |
| 15 | def __unicode__(self): return u'%s' % (self.name) |