Other information

1. Simple test

For simple test installations, it's easy: Django for Python2.5 is already installed, and (unless some new firewall is in place,) you can open high ports and access them from abroad via ip address (use /sbin/ifconfig eth0 to identify IP address.)

Django's webserver can be seen with:

python manage.py runserver 0.0.0.0:8024

2. Virtualenv

Virtualenv is not available in the python installation on HCOOP. You must download (wget) the script yourself and put it somewhere under your home directory.

   1 $ wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.1.tar.gz
   2 $ tar zxfv virtualenv-1.1.tar.gz 
   3 $ cp virtualenv-1.1/virtualenv.py ./

The environment that you create does include PIP. PIP is the new and improved easy_install. The option "freeze" works great with HCOOP. Create your Python environment (including Django ofcourse) on your home PC. Create the requirement file with 'pip freeze > yourrequirements.txt'. Push that file to HCOOP. Go to the bin directory in your environment. Use 'pip install -r yourrequirements.txt' and automatically everything is installed in that environment.

Virtualenv uses the default python interpreter for the virtual environment. On HCOOP the default is version 2.4. Support for SQLite is included in 2.5, so I prefer that version for Django. Python 2.5 is also available on HCOOP. Use the parameter -p python2.5 and that version will be installed in your environment. Don't forgot to use that version for mod_wsgi too.

   1 ./virtualenv.py -p python2.5 --no-site-packages $YOURVIRTUALENV

4. Django_cpserver

The application CherryPy is also very good in serving Python applications. CherryPy is also a Web Framework, but you can use it for serving only. The Django application cpserver integrates CherryPy nicely in Django with Django commands. It did run great at home and HCOOP. Unfortunaly I was never able to integrate it with the mod_rewrite in the Domtool. I'm quite sure it was my shortcoming. I solved the issue with a switch to mod_wsgi.


CategoryMemberManual CategoryNeedsWork