diff --git a/accounts/migrations/0005_accountconfirmchallenge_created_at.py b/accounts/migrations/0005_accountconfirmchallenge_created_at.py new file mode 100644 index 0000000..0bd9dca --- /dev/null +++ b/accounts/migrations/0005_accountconfirmchallenge_created_at.py @@ -0,0 +1,22 @@ +# Generated by Django 4.0.3 on 2022-06-11 10:38 + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ("accounts", "0004_accountconfirmchallenge_public_ref_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="accountconfirmchallenge", + name="created_at", + field=models.DateTimeField( + auto_now_add=True, default=django.utils.timezone.now + ), + preserve_default=False, + ), + ] diff --git a/accounts/models.py b/accounts/models.py index afe76fd..041503f 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -30,6 +30,7 @@ class AccountConfirmChallenge(models.Model): default=gen_secret, editable=False, ) + created_at = models.DateTimeField(auto_now_add=True, blank=True) challenge_text = models.CharField( "Challenge text",