rework prose editor configuration

This commit is contained in:
Tobias Brunner 2025-07-08 16:24:28 +02:00
parent 6b689704b0
commit 166f518db0
No known key found for this signature in database
5 changed files with 46 additions and 15 deletions

View file

@ -11,6 +11,7 @@ from .base import (
ManagedServiceProvider,
validate_image_size,
Currency,
get_prose_editor_field,
)
from .providers import CloudProvider
from .images import ImageReference
@ -19,10 +20,10 @@ from .images import ImageReference
class Service(ImageReference):
name = models.CharField(max_length=200)
slug = models.SlugField(max_length=250, unique=True)
description = ProseEditorField()
description = get_prose_editor_field()
tagline = models.TextField(max_length=500, blank=True, null=True)
categories = models.ManyToManyField(Category, related_name="services")
features = ProseEditorField()
features = get_prose_editor_field()
is_featured = models.BooleanField(default=False)
is_coming_soon = models.BooleanField(default=False)
disable_listing = models.BooleanField(default=False)
@ -74,7 +75,7 @@ class ServiceOffering(models.Model):
cloud_provider = models.ForeignKey(
CloudProvider, on_delete=models.CASCADE, related_name="offerings"
)
description = ProseEditorField(blank=True, null=True)
description = get_prose_editor_field(blank=True, null=True)
offer_description = models.ForeignKey(
ReusableText,
on_delete=models.PROTECT,
@ -129,7 +130,7 @@ class PlanPrice(models.Model):
class Plan(models.Model):
name = models.CharField(max_length=100)
description = ProseEditorField(blank=True, null=True)
description = get_prose_editor_field(blank=True, null=True)
plan_description = models.ForeignKey(
ReusableText,
on_delete=models.PROTECT,