From 1e1a2f6ac2cadfbc57cc855a67498af097391caf Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 19 Oct 2024 19:43:59 +0100 Subject: Changes the Resource to include Stripe reference --- ...ve_resource_price_resource_stripe_product_id.py | 23 ++++++++++++++++++++++ alphabetlearning/resources/models.py | 15 +++++++------- 2 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 alphabetlearning/resources/migrations/0020_remove_resource_price_resource_stripe_product_id.py (limited to 'alphabetlearning/resources') diff --git a/alphabetlearning/resources/migrations/0020_remove_resource_price_resource_stripe_product_id.py b/alphabetlearning/resources/migrations/0020_remove_resource_price_resource_stripe_product_id.py new file mode 100644 index 0000000..088556b --- /dev/null +++ b/alphabetlearning/resources/migrations/0020_remove_resource_price_resource_stripe_product_id.py @@ -0,0 +1,23 @@ +# Generated by Django 5.0.4 on 2024-10-19 15:11 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0019_alter_pdfpagesnapshot_options_and_more'), + ] + + operations = [ + migrations.RemoveField( + model_name='resource', + name='price', + ), + migrations.AddField( + model_name='resource', + name='stripe_product_id', + field=models.CharField(default='baws', max_length=100), + preserve_default=False, + ), + ] diff --git a/alphabetlearning/resources/models.py b/alphabetlearning/resources/models.py index 3dfad06..ebdf98d 100644 --- a/alphabetlearning/resources/models.py +++ b/alphabetlearning/resources/models.py @@ -37,13 +37,14 @@ DESC_HELP_TEXT = """ # Create your models here. class Resource(models.Model): name = models.CharField(max_length=255, null=False) - price = models.DecimalField( - max_digits=6, - decimal_places=2, - default=0.00, - null=False, - blank=False, - ) + stripe_product_id = models.CharField(max_length=100) + #price = models.DecimalField( + # max_digits=6, + # decimal_places=2, + # default=0.00, + # null=False, + # blank=False, + #) thumbnail_filenames = models.JSONField( null=False, verbose_name="Thumbnail filenames", -- cgit v1.2.3