2018-10-26 19:08:01 +00:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
# Create your models here.
|
2018-10-26 19:48:21 +00:00
|
|
|
class OTPSeed(models.Model):
|
2018-11-17 09:01:24 +00:00
|
|
|
id = models.AutoField(primary_key=True)
|
2018-11-17 08:42:34 +00:00
|
|
|
name = models.CharField(max_length=128)
|
|
|
|
realm = models.CharField(max_length=128)
|
2018-10-26 19:48:21 +00:00
|
|
|
seed = models.CharField(max_length=128)
|
2018-11-17 08:42:34 +00:00
|
|
|
|
|
|
|
class Meta:
|
|
|
|
unique_together = (('name', 'realm'),)
|
|
|
|
|
2018-11-17 09:14:37 +00:00
|
|
|
def __str__(self):
|
|
|
|
return "'{}'@{}".format(self.name, self.realm)
|