diff --git a/totem/onboard/migrations/0008_onboardmodel_referral_other_and_more.py b/totem/onboard/migrations/0008_onboardmodel_referral_other_and_more.py new file mode 100644 index 00000000..ec35ce97 --- /dev/null +++ b/totem/onboard/migrations/0008_onboardmodel_referral_other_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.4 on 2025-01-08 01:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('onboard', '0007_alter_onboardmodel_hopes_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='onboardmodel', + name='referral_other', + field=models.CharField(blank=True, help_text='Please tell us more about how you found us', max_length=100, verbose_name='If other, please specify'), + ), + migrations.AddField( + model_name='onboardmodel', + name='referral_source', + field=models.CharField(blank=True, choices=[('search', 'Search Results'), ('social', 'Social Media'), ('keeper', 'A Keeper'), ('pamphlet', 'Pamphlet'), ('blog', 'Blog'), ('newsletter', 'Newsletter'), ('dream', 'A Dream')], max_length=20, verbose_name='How did you hear about us?'), + ), + ] diff --git a/totem/onboard/migrations/0009_alter_onboardmodel_referral_source.py b/totem/onboard/migrations/0009_alter_onboardmodel_referral_source.py new file mode 100644 index 00000000..ca580d01 --- /dev/null +++ b/totem/onboard/migrations/0009_alter_onboardmodel_referral_source.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.4 on 2025-01-08 01:45 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('onboard', '0008_onboardmodel_referral_other_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='onboardmodel', + name='referral_source', + field=models.CharField(blank=True, choices=[('default', "I'm not sure"), ('search', 'Search Results'), ('social', 'Social Media'), ('keeper', 'A Keeper'), ('pamphlet', 'Pamphlet'), ('blog', 'Blog'), ('newsletter', 'Newsletter'), ('dream', '✨A Dream✨'), ('other', 'Other')], max_length=20, verbose_name='How did you hear about us?'), + ), + ] diff --git a/totem/onboard/models.py b/totem/onboard/models.py index 14af134b..20a46031 100644 --- a/totem/onboard/models.py +++ b/totem/onboard/models.py @@ -4,6 +4,17 @@ class OnboardModel(models.Model): + REFERRAL_CHOICES = [ + ("default", "I'm not sure"), + ("search", "Search Results"), + ("social", "Social Media"), + ("keeper", "A Keeper"), + ("pamphlet", "Pamphlet"), + ("blog", "Blog"), + ("newsletter", "Newsletter"), + ("dream", "✨A Dream✨"), + ("other", "Other"), + ] user = models.OneToOneField( settings.AUTH_USER_MODEL, on_delete=models.CASCADE, @@ -16,6 +27,18 @@ class OnboardModel(models.Model): suggestions = models.TextField(blank=True, null=True, validators=[MaxLengthValidator(5000)]) hopes = models.TextField(blank=True, null=True, validators=[MaxLengthValidator(5000)]) internal_notes = models.TextField(blank=True, null=True, validators=[MaxLengthValidator(10000)]) + referral_source = models.CharField( + max_length=20, + choices=REFERRAL_CHOICES, + verbose_name="How did you hear about us?", + blank=True, # Remove if you want to make it required + ) + referral_other = models.CharField( + max_length=100, + blank=True, + verbose_name="If other, please specify", + help_text="Please tell us more about how you found us", + ) def __str__(self): return f"Onboard: {self.user}" diff --git a/totem/onboard/templates/onboard/onboard_form.html b/totem/onboard/templates/onboard/onboard_form.html index 52d743d4..b0cc6f85 100644 --- a/totem/onboard/templates/onboard/onboard_form.html +++ b/totem/onboard/templates/onboard/onboard_form.html @@ -15,9 +15,10 @@
Other people will see this, but you don't have to use your real name. Add any pronouns in parentheses if you'd like. @@ -25,7 +26,9 @@
+ This helps us understand how to reach more people like you. +
+