mirror of
https://github.com/fergalmoran/fsai-api.git
synced 2025-12-22 09:18:39 +00:00
17 lines
501 B
Python
17 lines
501 B
Python
from .. import db
|
|
|
|
|
|
class EditableHTML(db.Model):
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
editor_name = db.Column(db.String(100), unique=True)
|
|
value = db.Column(db.Text)
|
|
|
|
@staticmethod
|
|
def get_editable_html(editor_name):
|
|
editable_html_obj = EditableHTML.query.filter_by(
|
|
editor_name=editor_name).first()
|
|
|
|
if editable_html_obj is None:
|
|
editable_html_obj = EditableHTML(editor_name=editor_name, value='')
|
|
return editable_html_obj
|