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

@ -1,16 +1,15 @@
from django.db import models
from django.urls import reverse
from django.utils.text import slugify
from django_prose_editor.fields import ProseEditorField
from .base import validate_image_size
from .base import validate_image_size, get_prose_editor_field
from .images import ImageReference
class CloudProvider(ImageReference):
name = models.CharField(max_length=100)
slug = models.SlugField(unique=True)
description = ProseEditorField()
description = get_prose_editor_field()
website = models.URLField()
linkedin = models.URLField(blank=True)
phone = models.CharField(max_length=25, blank=True, null=True)
@ -45,7 +44,7 @@ class CloudProvider(ImageReference):
class ConsultingPartner(ImageReference):
name = models.CharField(max_length=200)
slug = models.SlugField(unique=True)
description = ProseEditorField()
description = get_prose_editor_field()
website = models.URLField(blank=True)
linkedin = models.URLField(blank=True)
phone = models.CharField(max_length=25, blank=True, null=True)