Titivillus/signup/models.py

18 lines
423 B
Python

#!/usr/bin/env python3
"""
A table to lookup confirmation codes.
"""
from django.db import models
from django.conf import settings
class Confirmation(models.Model):
"""
Contains a reference to the user's newly created account
and a random string to be emailed to them for them to confirm.
"""
user = models.ForeignKey(
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE
)
code = models.CharField(max_length=32)