Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/lbc 347 new member signup flow #471

Merged
merged 4 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ def ready(self):
self.configure_posthog()
self.configure_shopify()

from .slippers_autoload_components import register

register()

def configure_shopify(self):
stripe.api_key = djstripe.settings.djstripe_settings.STRIPE_SECRET_KEY
stripe.api_version = "2020-08-27"
Expand Down
17 changes: 16 additions & 1 deletion app/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def update_subscription(self, *args, **kwargs):

# Create a form with a field for user_id, donation_amount, and on submission add a donation product to the subscription
class DonationForm(forms.Form):
user_id = forms.IntegerField(widget=forms.HiddenInput)
user_id = forms.IntegerField(widget=forms.HiddenInput, required=False)
donation_amount = forms.DecimalField(
min_value=0,
max_value=1000,
Expand Down Expand Up @@ -714,3 +714,18 @@ def process_request(self, *args, **kwargs):
else None,
},
)


### V2 flow forms


class SelectDeliveriesForm(forms.Form):
delivery_plan_id = forms.CharField(widget=forms.HiddenInput)


class SelectSyllabusForm(forms.Form):
syllabus_id = forms.CharField(widget=forms.HiddenInput)


class SelectPaymentPlanForm(forms.Form):
payment_plan_id = forms.CharField(widget=forms.HiddenInput)
2 changes: 1 addition & 1 deletion app/management/commands/create_gift_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.core.management.base import BaseCommand
from django.urls import reverse
from djmoney.money import Money
from wagtail.core.models import Page
from wagtail.models import Page

from app.models import MembershipPlanPage, MembershipPlanPrice, User
from app.utils.python import uid
Expand Down
2 changes: 1 addition & 1 deletion app/migrations/0019_alter_homepage_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
2 changes: 1 addition & 1 deletion app/migrations/0027_alter_homepage_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -977,7 +977,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -1242,7 +1242,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -367,7 +367,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -896,7 +896,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -1738,7 +1738,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -888,7 +888,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -1730,7 +1730,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -2583,7 +2583,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
2 changes: 1 addition & 1 deletion app/migrations/0044_membershipplanpage_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
2 changes: 1 addition & 1 deletion app/migrations/0045_alter_membershipplanpage_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -886,7 +886,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -915,7 +915,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -1772,7 +1772,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -2622,7 +2622,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -3472,7 +3472,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -4322,7 +4322,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -908,7 +908,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -1768,7 +1768,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -2628,7 +2628,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -3488,7 +3488,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -4348,7 +4348,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down Expand Up @@ -5222,7 +5222,7 @@ class Migration(migrations.Migration):
(
"plans",
wagtail.blocks.ListBlock(
app.models.wagtail.PlanBlock
app.models.blocks.PlanBlock
),
),
]
Expand Down
Loading
Loading