diff --git a/hub/services/admin.py b/hub/services/admin.py index 07db3f4..5965c8b 100644 --- a/hub/services/admin.py +++ b/hub/services/admin.py @@ -85,7 +85,9 @@ class ServiceAdmin(admin.ModelAdmin): class PlanInline(admin.StackedInline): model = Plan extra = 1 - fieldsets = ((None, {"fields": ("name", "description", "plan_description")}),) + fieldsets = ( + (None, {"fields": ("name", "description", "pricing", "plan_description")}), + ) class ExternalLinkOfferingInline(admin.TabularInline): diff --git a/hub/services/migrations/0014_plan_pricing.py b/hub/services/migrations/0014_plan_pricing.py new file mode 100644 index 0000000..e4fd3eb --- /dev/null +++ b/hub/services/migrations/0014_plan_pricing.py @@ -0,0 +1,21 @@ +# Generated by Django 5.1.5 on 2025-03-03 07:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ( + "services", + "0011_reusabletext_textsnippet_squashed_0013_alter_plan_description", + ), + ] + + operations = [ + migrations.AddField( + model_name="plan", + name="pricing", + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/hub/services/models.py b/hub/services/models.py index f55ac75..8c24bb7 100644 --- a/hub/services/models.py +++ b/hub/services/models.py @@ -226,6 +226,7 @@ class ServiceOffering(models.Model): class Plan(models.Model): name = models.CharField(max_length=100) description = ProseEditorField(blank=True, null=True) + pricing = ProseEditorField(blank=True, null=True) plan_description = models.ForeignKey( ReusableText, on_delete=models.PROTECT, diff --git a/hub/services/templates/services/offering_detail.html b/hub/services/templates/services/offering_detail.html index a04a8cb..0a1f887 100644 --- a/hub/services/templates/services/offering_detail.html +++ b/hub/services/templates/services/offering_detail.html @@ -132,6 +132,11 @@ {{ plan.description|safe }} {% endif %} + {% if plan.pricing %} +
+ {{ plan.pricing|safe }} +
+ {% endif %}