one sqlalchemy session per thread

This commit is contained in:
j 2014-08-09 18:14:14 +02:00
commit 8b46a85d56
15 changed files with 140 additions and 102 deletions

View file

@ -11,3 +11,6 @@ def user():
import settings
import user.models
return user.models.User.get_or_create(settings.USER_ID)
from threading import local
db = local()