Update the model to remove uuid, simplify
This commit is contained in:
parent
41c49800ee
commit
a58886979f
1 changed files with 14 additions and 5 deletions
|
@ -1,10 +1,19 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
import uuid
|
|
||||||
|
|
||||||
# Create your models here.
|
# Create your models here.
|
||||||
class OTPSeed(models.Model):
|
class OTPSeed(models.Model):
|
||||||
appuuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
name = models.CharField(max_length=128)
|
||||||
appname = models.CharField(max_length=128)
|
realm = models.CharField(max_length=128)
|
||||||
username = models.CharField(max_length=128)
|
|
||||||
seed = models.CharField(max_length=128)
|
seed = models.CharField(max_length=128)
|
||||||
trusted = models.BooleanField(default=False)
|
|
||||||
|
class Meta:
|
||||||
|
unique_together = (('name', 'realm'),)
|
||||||
|
|
||||||
|
|
||||||
|
# V1
|
||||||
|
# class OTPSeed(models.Model):
|
||||||
|
# appuuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||||
|
# appname = models.CharField(max_length=128)
|
||||||
|
# username = models.CharField(max_length=128)
|
||||||
|
# seed = models.CharField(max_length=128)
|
||||||
|
# trusted = models.BooleanField(default=False)
|
||||||
|
|
Loading…
Reference in a new issue