demgirlz/demweb/extensions.py

13 lines
270 B
Python
Raw Normal View History

2021-05-14 20:29:29 +02:00
from flask_sqlalchemy import SQLAlchemy
2021-05-20 00:31:31 +02:00
from dictalchemy import make_class_dictable
2021-05-14 20:29:29 +02:00
import config
db = SQLAlchemy()
2021-05-20 00:31:31 +02:00
make_class_dictable(db.Model)
2021-05-14 20:29:29 +02:00
default_config = dict()
for key in dir(config):
if key.isupper():
default_config[key] = getattr(config, key)