Deploying Django: How do you do it?
I have tried following guides like this one but it just didnt work for me.
So my question is this: What is a good guide for deploying Django, and how do you deploy your Django.
I keep hearing that capastrano is pretty nifty to use, but i have no idea as to how to work it or what it does (apart from automation of deploying code), or even if i want/need to use it or not.
Asked by: Tess655 | Posted: 28-01-2022
Answer 1
mod_wsgi
in combination with a virtualenv
for all the dependencies, a mercurial checkout into the virtualenv and a fabric
recipe to check out the changes on the server.
I wrote an article about my usual workflow: Deploying Python Web Applications. Hope that helps.
Answered by: Kellan363 | Posted: 01-03-2022Answer 2
I have had success with mod_wsgi
Answered by: Emily774 | Posted: 01-03-2022Answer 3
In my previous work we had real genius guy on deployment duties, he deployed application (Python, SQL, Perl and Java code) as set of deb files built for Ubuntu. Unfortunately now, I have no such support. We are deploying apps manually to virtualenv-ed environments with separate nginx configs for FastCGI. We use paver to deploy to remote servers. It's painful, but it works.
Answered by: Ada516 | Posted: 01-03-2022Answer 4
This looks like a good place to start: http://www.unessa.net/en/hoyci/2007/06/using-capistrano-deploy-django-apps/
Answered by: Thomas717 | Posted: 01-03-2022Answer 5
I use mod_python, and have every site in a git repository with the following subdirs:
- mysite
- template
- media
I have mysite/settings.py
in .gitignore
, and work like this:
- do development on my local machine
- create remote repository on webserver
- push my changes to webserver repo
- set up apache vhost config file, tweak live server settings.py
- run
git checkout && git reset --hard && sudo /etc/init.d/apache2 restart
on webserver repo to get up-to-date version to its working copy and restart apache - repeat steps 1, 3 and 5 whenever change request comes
Answer 6
The easiest way would be to use one of the sites on http://djangofriendly.com/hosts/ that will provide the hosting and set up for you, but even if you're wanting to roll your own it will allow you to see what set up other sites are using.
Answered by: Marcus497 | Posted: 01-03-2022Similar questions
python - Django: do I need to restart Apache when deploying?
I just noted an annoying factor: Django requires either a restart of the server or CGI access to work. The first option is not feasible if you don't have access to the Apache server process. The second, as far as I know, is detrimental to performance, and in general the idea of running a CGI makes me uncomfortable.
I also ...
python - Deploying Google Analytics With Django
We're about to deploy a new Django website, and we want to use Google Analytics to keep track of traffic on the site. However, we don't want all of the hits on development instances to contribute to the Google Analytics statistics.
There are a few ways we could deal with this:
have a configuration option in settings.py which the base template uses to decide whether or not to include the appropriate
python - Error while deploying Django on Apache
I have a small Django website which I am trying to run on an Apache 2.2 HTTP-Server.
The application is running fine using "python manage.py runserver".
Django Version: 1.0.2 final
Python: 2.5
OS: Windows 2000
I wen't through the steps described in the documentation and after some fiddling...
python - Deploying Pylons with Nginx reverse proxy?
Is there a tutorial on how to deploy Pylons with Nginx?
I've been able to start nginx and then serve pylons to :8080 with paster serve development.ini
However, I can't seem to do other stuff as pylons locks me into that serve mode. If I try to CTRL+Z out of pylons serving to do other stuff on my server, pylons goes down.
There must be a different method of deployment.
PS - I've done all thi...
python - Deploying Django
When finding web hosting for Rails apps, the hoster must have support for ruby on rails -- that is evident. What about hosting for Django? What support does the hoster need to provide? Python, or more than just Python?
This might seem like an obvious question, but I'm new to web development frameworks so I must ask :)
python - Django: do I need to restart Apache when deploying?
I just noted an annoying factor: Django requires either a restart of the server or CGI access to work. The first option is not feasible if you don't have access to the Apache server process. The second, as far as I know, is detrimental to performance, and in general the idea of running a CGI makes me uncomfortable.
I also ...
python - Deploying CherryPy (daemon)
I've followed the basic CherryPy tutorial (http://www.cherrypy.org/wiki/CherryPyTutorial). One thing not discussed is deployment.
How can I launch a CherryPy app as a daemon and "forget about it"? What happens if the server reboots?
Is there a standard recipe? Maybe something that will create a service script (/etc/init.d/cherry...
python - Auto kill fastcgi process when deploying django
Everything goes well days ago. But since today, when I run fastcgi, the process will be killed by system automatically. The worst thing is I don't know why and which process kill the fastcgi process.
Let me give some detail.
we use nginx to serve static files for another django app which listen to 80 port.(this is for production use)
And we use lighttpd/fastcgi for another two django apps, which li...
python - Deploying Pylons with uWSGI
We're trying to move our intranet to Pylons. My boss is trying to set up Pylons to use uWSGI behind Apache so he can set up multiple, independent applications. However, he's having a difficult time getting it set up, with some apparent code problems in the C source code for uWSGI. Does anyone have any suggestions for how to deploy Pylons applications that might help us out?
Thanks,
Doug
python - Settings module not found deploying django on a shared server
I'm trying to deploy my django project on a shared hosting as describe here
I have my project on /home/user/www/testa
I'm using this script
#!/usr/bin/python
import sys, os
sys.path.append("/home/user/bin/python")
sys.path.append('/...
python - Deploying Django (fastcgi, apache mod_wsgi, uwsgi, gunicorn)
Can someone explain the difference between apache mod_wsgi in daemon mode and django fastcgi in threaded mode. They both use threads for concurrency I think.
Supposing that I'm using nginx as front end to apache mod_wsgi.
UPDATE:
I'm comparing django built in fastcgi(./manage.py method=threaded maxchildren=15) and mod_wsgi in 'daemon' mode(WSGIDaemonProcess example threads=...
Still can't find your answer? Check out these communities...
PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python