13 lines
356 B
Python
13 lines
356 B
Python
|
from django.db.models import Model, CharField, ForeignKey, CASCADE, DateTimeField
|
||
|
from django.contrib.auth import get_user_model
|
||
|
|
||
|
from dbsettings.functions import getValue
|
||
|
|
||
|
import pyotp
|
||
|
|
||
|
# Create your models here.
|
||
|
|
||
|
class TOTPUser(Model):
|
||
|
secret = CharField(max_length=32, default=pyotp.random_base32())
|
||
|
user = ForeignKey(get_user_model(), CASCADE)
|