Deploying a premade Django application?

Posted July 23, 2014 8.1k views

I have a 100% working premade Django website that I spent the past week or so working on. After a lot of twists and round abouts, I discovered not every host supported Django. Then I was like “Duh!”. Luckily, I found this website. I searched around a bit, and I can’t find a way to deploy a premade Django website to this web host. Is it possible? It’d be ab absolute shame to see an entire website to go to waste :|


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Take a look at How To Deploy a Local Django App to a VPS. If your app isn’t stored on a git repository, you can use FileZilla or any other SFTP client to transfer your app to your droplet.

by Stephen Tippets
Here you'll learn how to deploy a local Django app to a VPS.

A simple way to do this is to swap the server files in the one-click install image of Django that Digital Ocean provides with the files you’ve created on your local machine.

However this would only work if both projects use the same Django version, the one-click image I believe is using 1.6.1, and if you’ve started a project recently it is likely you are using a version > 1.7.

If you are using the same version though, just replace the django directory with your nearly identical project using git, filezilla, or a similar program. Then modify the file to match that of the original, mainly the credentials for the database. Then issue a ‘python sql <your apps>’, 'python syncdb’, and 'service gunicorn restart’, and you should be good to go.

Again this is only a working solution if the versions match, and its an imperfect one at that. If you’re new to Django I’d suggest reading up on Django settings and configurations, which should allow you to deploy applications on nearly any VPS.