View Full Version : mod_python django

02-17-2008, 09:33 PM
I have succesfully installed django.
Is anyone else using django on West Host?

02-19-2008, 12:07 PM
Not yet using Django on westhost but have considered it. Any tricks you'd like to outline for future reference, Daniel? I'm also interested in Pylons (also Python-based) hosting here.

03-04-2008, 11:14 PM
Will you please post the steps requiered to install django on the server.


05-10-2008, 01:58 PM
I'd love to learn more about installing Django. I have a number of client projects that I could use this for!

WestHost - MCox
05-12-2008, 12:40 PM

It appears the django site has fairly detailed information on how to install the application at:

05-12-2008, 05:43 PM
Thanks for the reply and info Mark,
I've got that one bookmarked. Perhaps I should be more clear. I am seeking to learn about any particular issues that may be encountered installing it on the typical WestHost VPS. I'd rather not cause anyone grief while I'm playing with it.

I just ordered 4 books on Django and will download and attempt to install it sometime in the next month or so after I get a handle on the command set and dos/don'ts.

WestHost - MCox
05-13-2008, 11:01 AM

I installed Django on my account without any problem by following these steps:

-Install Python through your Site Manager (if it is not already installed)
-Log into your account via SSH
-Change directory to /usr/local, or wherever else you'd like the application installed (cd /usr/local)
-Download the Django installation files (wget http://www.djangoproject.com/download/0.96.1/tarball/ )
-Extract the tarball (tar -zxvf Django-0.96.1.tar.gz )
-Change directory to the directory that was created from extracting (cd Django-0.96.1 )
-Run the installation (python setup.py install )

I hope that helps.

05-13-2008, 06:51 PM
Yup! :) That helps - seems too simple but I'll give it a go! Thanks!

05-19-2008, 08:29 PM
I got the files installed and they look correct (from my rather inexperienced POV). But I keep getting an error when I try to run a Django command from SSH command line. The error:

-sh: /usr/local/Django-0.96.2/django/bin/django-admin.py: /usr/bin/env: bad interpreter: No such file or directory

I used a symlink and when that didn't work, I tried the direct path to django-admin.py and got the same error.

Python seems to be working fine so I'm not sure what I missed. I used the command line to retrieve the files from the djangoproject.com and also the command line to untar them into their current directory /usr/local/Django-0.96.2/

If you have a moment I'd appreciate a nudge in the right direction. Thanks.

05-20-2008, 07:47 AM
Ok here's the answer.

WestHost uses a non standard location (according to the Django community) for the Env command. What I had to do was to edit the django-admin.py file (use PICO) and change the first line where it calls for env.

Original: /usr/bin/env
Edited: /bin/env

Now it works just fine.

06-15-2008, 09:14 PM
I am a westhost newbie, and am thinking to install Django on westhost.
I understand that Django requires pre installing mod_python / mod_wsgi into Apache, which i understand needs root admin privilege to do so; furthermore, Apache may need be restarted after the module add-on. Am i permitted such actions on Apache at westhost? Would appreciate a reply.


06-16-2008, 06:12 AM
Python is available for install via Site Manager. There have been a couple of folks who where able to get it running in the past. http://forums.westhost.com/showthread.php?t=9001