👔(backend) add code_editor column on Template
To save the template code editor content, we need to add a new column on the Template model. It is a JSONField that will store the code editor content. We could in the future make an implementation to save the code editor content in Minio.
This commit is contained in:
@@ -326,6 +326,12 @@ class Template(BaseModel):
|
||||
|
||||
title = models.CharField(_("title"), max_length=255)
|
||||
description = models.TextField(_("description"), blank=True)
|
||||
code_editor = models.JSONField(
|
||||
_("code editor"),
|
||||
help_text=_("A JSON object with all the editor information"),
|
||||
blank=True,
|
||||
default=dict,
|
||||
)
|
||||
code = models.TextField(_("code"), blank=True)
|
||||
css = models.TextField(_("css"), blank=True)
|
||||
is_public = models.BooleanField(
|
||||
|
||||
Reference in New Issue
Block a user