aboutsummaryrefslogtreecommitdiffstats
path: root/alphabetlearning/payments
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2025-01-07 22:01:44 +0000
committerMatthew Lemon <y@yulqen.org>2025-01-07 22:01:44 +0000
commitba381a9caf9ce7e6eb5731b340c4d208b44c2ca7 (patch)
tree89abdfa1f5937573596b1d852e7803f0ad3087df /alphabetlearning/payments
parented81f85afabf7d91a9badcd38865d43af77f483a (diff)
wip: sorting out tests and factories
Diffstat (limited to 'alphabetlearning/payments')
-rw-r--r--alphabetlearning/payments/migrations/0003_alter_price_price.py18
-rw-r--r--alphabetlearning/payments/migrations/0004_alter_price_price.py18
-rw-r--r--alphabetlearning/payments/models.py3
-rw-r--r--alphabetlearning/payments/views.py1
4 files changed, 38 insertions, 2 deletions
diff --git a/alphabetlearning/payments/migrations/0003_alter_price_price.py b/alphabetlearning/payments/migrations/0003_alter_price_price.py
new file mode 100644
index 0000000..3b69f8f
--- /dev/null
+++ b/alphabetlearning/payments/migrations/0003_alter_price_price.py
@@ -0,0 +1,18 @@
+# Generated by Django 5.1.4 on 2025-01-06 20:55
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('payments', '0002_initial'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='price',
+ name='price',
+ field=models.DecimalField(decimal_places=2, default=0, max_digits=3),
+ ),
+ ]
diff --git a/alphabetlearning/payments/migrations/0004_alter_price_price.py b/alphabetlearning/payments/migrations/0004_alter_price_price.py
new file mode 100644
index 0000000..ae72dbf
--- /dev/null
+++ b/alphabetlearning/payments/migrations/0004_alter_price_price.py
@@ -0,0 +1,18 @@
+# Generated by Django 5.1.4 on 2025-01-06 20:59
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('payments', '0003_alter_price_price'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='price',
+ name='price',
+ field=models.IntegerField(default=0),
+ ),
+ ]
diff --git a/alphabetlearning/payments/models.py b/alphabetlearning/payments/models.py
index 44c8597..12c82f4 100644
--- a/alphabetlearning/payments/models.py
+++ b/alphabetlearning/payments/models.py
@@ -1,13 +1,12 @@
import uuid
from datetime import timedelta
+from alphabetlearning.resources.models import Resource
from django.conf import settings
from django.core.exceptions import ValidationError
from django.db import models
from django.utils import timezone
-from alphabetlearning.resources.models import Resource
-
class EmailVerification(models.Model):
email = models.EmailField(unique=True)
diff --git a/alphabetlearning/payments/views.py b/alphabetlearning/payments/views.py
index cdfafe6..cf442d7 100644
--- a/alphabetlearning/payments/views.py
+++ b/alphabetlearning/payments/views.py
@@ -173,6 +173,7 @@ class ProductLandingPageView(TemplateView):
@login_required
def add_to_cart(request, resource_id):
+ breakpoint()
resource = get_object_or_404(Resource, id=resource_id)
if not resource.price_obj.first():
return HttpResponseBadRequest(