I have never deployed a Django site before. I am currently looking to set it up in my deluxe GoDaddy account. Does anyone have any documentation on how to go about installing python and django on GoDaddy?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For future reference, as I assume you have moved on…
It is possible to use Django on GoDaddy hosting, using VirtualEnv as they recommend. Python 2.7 is natively installed and works fine, though it isn’t the default version to be run.
This works for me on a deluxe account, though I would still recommend that anyone who definitely wants to use Django seek alternate hosting. GoDaddy is not very friendly, and I am not certain that everything will continue to work.
EDIT
I realized there may also be some confusion in how to get Django running normally inside Apache, without the regular mod_* options. This was my approach:
Create the following script ‘django_cgi.py’ inside ~/code (Note the python path!):
Inside ~/html, create or edit the .htaccess file with some variant of the following:
Finally, create ~/html/mysite.cgi as follows:
This is over simplified but functional, and should result in every request for any page or file being passed off to Django.
The reason for this runaround is that GoDaddy provides only native CGI support for old versions of Python we can’t use, so we must use our virtual environment. While we cannot use that directly in the CGI scripts, we can fortunately run a shell script and invoke it manually. The mod_rewrite rule just ensures all traffic goes through Django.
References
Django with FastCGI
Start of Django Tutorials
VirtualEnv