~sirn/fanboi2

ref: 834edf0edc5dd633c0ecea16231b6ed2d728476d fanboi2/fanboi2/models/setting.py -rw-r--r-- 404 bytes
834edf0eKridsada Thanabulpong Massive cleanup in preparation for 0.30 (#25) 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from sqlalchemy.sql.schema import Column
from sqlalchemy.sql.sqltypes import String, JSON

from ._base import Base, Versioned


DEFAULT_SETTINGS = {
    'app.time_zone': 'UTC',
    'app.ident_size': 10,
}


class Setting(Versioned, Base):
    """Model class for various site settings."""

    __tablename__ = 'setting'

    key = Column(String, nullable=False, primary_key=True)
    value = Column(JSON)