Add a hidden column to templates

Allows hiding templates from the templates list in the admin app
and related API responses.

This is used for 'internal' templates that we create for notifications
that wouldn't have a template otherwise (eg pre-compiled PDF letters)
This commit is contained in:
Alexey Bezhan
2018-02-22 11:53:42 +00:00
parent 444dba994d
commit c4fddab6a6

View File

@@ -664,6 +664,7 @@ class TemplateBase(db.Model):
updated_at = db.Column(db.DateTime, onupdate=datetime.datetime.utcnow)
content = db.Column(db.Text, nullable=False)
archived = db.Column(db.Boolean, nullable=False, default=False)
hidden = db.Column(db.Boolean, nullable=False, default=False)
subject = db.Column(db.Text)
@declared_attr