Exemplo n.º 1
0
class Setting(Base):
    """base setting model"""

    __abstract__ = True

    name = db.Column(db.String(100))
    label = db.Column(db.String(100))
    description = db.Column(db.Text)
    value = db.Column(db.Text)
    type = db.Column(db.String(50))
    toggable = db.Column(db.Boolean, default=True)
Exemplo n.º 2
0
class Role(Base):
    """base role model (<- hahaha. punny)"""

    __abstract__ = True

    name = db.Column(db.String(100))
    permissions = db.Column(db.Text)

    def all_permissions(self):
        return [s.strip() for s in self.permissions.split(',')]