|
|
@ -1,5 +1,3 @@
|
|
|
|
from configparser import ConfigParser
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import bcrypt
|
|
|
|
import bcrypt
|
|
|
|
from sqlalchemy.ext.declarative import declarative_base
|
|
|
|
from sqlalchemy.ext.declarative import declarative_base
|
|
|
|
from sqlalchemy import Column, Integer, String, ForeignKey, DateTime, Boolean, Numeric
|
|
|
|
from sqlalchemy import Column, Integer, String, ForeignKey, DateTime, Boolean, Numeric
|
|
|
@ -8,11 +6,7 @@ from sqlalchemy.sql import expression
|
|
|
|
from sqlalchemy.ext.compiler import compiles
|
|
|
|
from sqlalchemy.ext.compiler import compiles
|
|
|
|
from sqlalchemy.types import DateTime as DateTimeType
|
|
|
|
from sqlalchemy.types import DateTime as DateTimeType
|
|
|
|
|
|
|
|
|
|
|
|
cfg = ConfigParser()
|
|
|
|
BCRYPT_LOG_ROUNDS = 13
|
|
|
|
cfg.read('config.ini')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BCRYPT_LOG_ROUNDS = int(cfg.get('user', 'BCRYPT_LOG_ROUNDS'))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# can be moved to models util?
|
|
|
|
# can be moved to models util?
|
|
|
|
class utcnow(expression.FunctionElement):
|
|
|
|
class utcnow(expression.FunctionElement):
|
|
|
|