using mocked settings module, also more porting over sqlalchemy to django orm