modified for deploying with nginx and uwsgi