diff --git a/src/fellchensammlung/migrations/0021_user_reason_for_signup.py b/src/fellchensammlung/migrations/0021_user_reason_for_signup.py new file mode 100644 index 0000000..7b83916 --- /dev/null +++ b/src/fellchensammlung/migrations/0021_user_reason_for_signup.py @@ -0,0 +1,19 @@ +# Generated by Django 5.1.1 on 2024-11-14 20:15 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('fellchensammlung', '0020_alter_rescueorganization_internal_comment'), + ] + + operations = [ + migrations.AddField( + model_name='user', + name='reason_for_signup', + field=models.TextField(default='-', verbose_name='Grund für die Registrierung'), + preserve_default=False, + ), + ] diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index 86d75d1..495d82f 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -149,6 +149,8 @@ class User(AbstractUser): updated_at = models.DateTimeField(auto_now=True) organization_affiliation = models.ForeignKey(RescueOrganization, on_delete=models.PROTECT, null=True, blank=True, verbose_name=_('Organisation')) + reason_for_signup = models.TextField(verbose_name=_("Grund für die Registrierung")) + REQUIRED_FIELDS = ["reason_for_signup", "email"] class Meta: verbose_name = _('Nutzer*in')