Commit 497cf47f authored by sim's avatar sim

[REFACT] Move database url in settings to share it

parent 8fdc4870
......@@ -10,10 +10,7 @@ from sqlalchemy import delete
def get_engine():
from sqlalchemy import create_engine
url = 'postgresql+psycopg2://{USER}:{PASSWORD}@{HOST}:{PORT}/{NAME}'.format(
**settings.DATABASES['default']
)
return create_engine( url
return create_engine( settings.DATABASES['default']['URL']
, use_native_hstore = True
, json_serializer = json_dumps
, pool_size=20, max_overflow=0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment