feat: add signup-reason

This commit is contained in:
moanos [he/him] 2024-11-14 21:54:32 +01:00
parent c4976c4b34
commit 87066b0cea
2 changed files with 21 additions and 0 deletions

View File

@ -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,
),
]

View File

@ -149,6 +149,8 @@ class User(AbstractUser):
updated_at = models.DateTimeField(auto_now=True) updated_at = models.DateTimeField(auto_now=True)
organization_affiliation = models.ForeignKey(RescueOrganization, on_delete=models.PROTECT, null=True, blank=True, organization_affiliation = models.ForeignKey(RescueOrganization, on_delete=models.PROTECT, null=True, blank=True,
verbose_name=_('Organisation')) verbose_name=_('Organisation'))
reason_for_signup = models.TextField(verbose_name=_("Grund für die Registrierung"))
REQUIRED_FIELDS = ["reason_for_signup", "email"]
class Meta: class Meta:
verbose_name = _('Nutzer*in') verbose_name = _('Nutzer*in')