put pricing in its own field
This commit is contained in:
parent
6cfbc516f8
commit
ae2a9b773b
4 changed files with 30 additions and 1 deletions
|
@ -85,7 +85,9 @@ class ServiceAdmin(admin.ModelAdmin):
|
||||||
class PlanInline(admin.StackedInline):
|
class PlanInline(admin.StackedInline):
|
||||||
model = Plan
|
model = Plan
|
||||||
extra = 1
|
extra = 1
|
||||||
fieldsets = ((None, {"fields": ("name", "description", "plan_description")}),)
|
fieldsets = (
|
||||||
|
(None, {"fields": ("name", "description", "pricing", "plan_description")}),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ExternalLinkOfferingInline(admin.TabularInline):
|
class ExternalLinkOfferingInline(admin.TabularInline):
|
||||||
|
|
21
hub/services/migrations/0014_plan_pricing.py
Normal file
21
hub/services/migrations/0014_plan_pricing.py
Normal file
|
@ -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),
|
||||||
|
),
|
||||||
|
]
|
|
@ -226,6 +226,7 @@ class ServiceOffering(models.Model):
|
||||||
class Plan(models.Model):
|
class Plan(models.Model):
|
||||||
name = models.CharField(max_length=100)
|
name = models.CharField(max_length=100)
|
||||||
description = ProseEditorField(blank=True, null=True)
|
description = ProseEditorField(blank=True, null=True)
|
||||||
|
pricing = ProseEditorField(blank=True, null=True)
|
||||||
plan_description = models.ForeignKey(
|
plan_description = models.ForeignKey(
|
||||||
ReusableText,
|
ReusableText,
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
|
|
|
@ -132,6 +132,11 @@
|
||||||
{{ plan.description|safe }}
|
{{ plan.description|safe }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if plan.pricing %}
|
||||||
|
<div class="text-black mb-20">
|
||||||
|
{{ plan.pricing|safe }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="btn btn-primary btn-lg w-100"
|
<a class="btn btn-primary btn-lg w-100"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue