2👍
Start with the docs here – this will give you a good overview.
To your specific questions:
1/ Django is not backwards compatible. You should install 1.6.x. Likely, there’s a requirements.txt
file in the root directory of your app. On your new server, install pip and then pip install -r requirements.txt
will install your dependencies. I would personally use virtualenvwrapper
to manage your dependencies on the server
2/ Check the docs, but the main steps are:
- Choose a web server. I personally use nginx. You’ll need to setup your nginx.conf.
- Choose a Python WSGI HTTP Server – I use gunicorn. You’ll also need to configure this. This tutorial is a great place to start.
- If you use the DigitalOcean tutorial above, any linux server will do. Last, you’ll need to upload your Postgres database to the server but sounds like you’re able to do that.
3/ You will need to edit your settings.py
of the Django project and update certain variables.
- If you’re changing your database, as well as the app deployment, you’ll need to edit the database connection, run
./manage.py syncdb
and./manage.py migrate
(if you’re using South) to set up the database schema. - It’s also recommended to change the
SECRET_KEY
between deployments. - If you’re deploying on a different hosts, you’ll need to edit
ALLOWED_HOSTS
appropriately for your new deployment as well.
Good luck!
Source:stackexchange.com