ofite/app/website/models/html_block.py

25 lines
664 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from django.db import models
from django_ckeditor_5.fields import CKEditor5Field
class HTMLBlock(models.Model):
name = models.CharField(
max_length=255,
verbose_name="Название",
help_text="Введите название HTML-блока."
)
content = CKEditor5Field(
'Text',
config_name='extends',
help_text="Введите содержимое HTML-блока с использованием CKEditor 5."
)
def __str__(self):
return self.name
class Meta:
verbose_name = "HTML-блок"
verbose_name_plural = "HTML-блоки"
ordering = ['name']