I helped Sensory Minds to build an interactive multi-touch and tangible media installation for a Werkschau of students from the Hochschule Pforzheim. Graduates are represented by objects that are provided with a fiducial on the underside and a picture of the work on the upper side. As soon as the object is added to the table, pictures of the student’s projects will be loaded and circularly arranged around the object. Those pictures can be browsed via multi-touch. If a user taps on a project picture all pictures to this project will be loaded and will be arranged on a second circle around the project images.
I had some struggles when installing django on my OpenSUSE virtual server. It started with the problem, that I have not found a django rpm via yast in the OpenSUSE repositories. Thus, I decided to install django manually and to keep the footprint as small as possible. Luckily, Python 2.5.1 and the appropriate mod_python module for Apache have been installed already.
These are the steps that worked for me:
- I installed subversion, the MySQL Python lib and python-devel via yast.
- I checked out the up to date django version via svn into /opt.
- I ran “sudo python setup.py install” from the trunk directory.
- I added “PYTHONPATH = djangoProjectDirectory” to my bash configuration (exchange djangoProjectDirectory with the path to your project directory).
- For the integration of django into Apache I needed to enable mod_env.
- According to the django mod_python site, I created a snippet I need for the integration into Apache. This snippet looks like this:
#Map global URL /media to media folder of django's admin page
Alias /media /opt/trunk/django/contrib/admin/media
Allow from all
#add django project itself (repeat so for each additional django project)
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonOption django.root /mysite
- I stored this snippet in a separate config file called django.conf into the folder /etc/apache2/conf.d/ from which all files are automatically loaded whenever Apache starts.
- Restart Apache.
- Go to http://your-domain.com/mysite or http://your-domain.com/mysite/admin (as you might have guessed already, exchange your-domain.com with your domain)
Today I came upon a problem when I wanted to integrate a Django project into my Apache via mod_python on my OpenSUSE virtual server.
I put the snippet I need for Django into a separate config file called django.conf into the folder /etc/apache2/conf.d/ from which all files are automatically loaded whenever Apache starts.
Everytime I wanted to start my Apache it said
Syntax error on line 6 of /etc/apache2/conf.d/django.conf:
Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration
This seems to be a problem with the Apache configuration of OpenSUSE as mod_env which provides the SetEnv directive is installed but disabled.
- Start yast (from the command line)
- Select “Network Services”
- Select “HTTP Server”
- Select “Server Modules”
- Select “Network Services”
- Scroll to “env”
- Select “Toggle Status”
- Select “Finish”