expephalon-demomodule/totp/models.py
Klaus-Uwe Mitterer 85fe13edcf Implemented TOTP
Implemented currencies and taxes
2020-05-22 18:13:23 +02:00

10 lines
326 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
class TOTPUser(Model):
secret = CharField(max_length=32, default=pyotp.random_base32)
user = ForeignKey(get_user_model(), CASCADE)