Moved from sqlalchemy library to django ORM