Created: 2011-07-09 17:37
Updated: 2019-02-08 06:50

Installing prerequisites

Execute the following code to install the prerequisites:

$ sudo aptitude install -y python-setuptools
$ sudo easy_install pip
$ sudo pip install virtualenvwrapper

Setup virtualenvwrapper

In order to make the most use of virualenvwrapper, ensure the following lines are at the end of you /.bashrc file (/.profile in Mac):

source /usr/local/bin/

One quick note about the WORKON_HOME variable - that''s where the virtualenvs are going to be stored. Modify that so it fits your system.

Before moving to the next step, make sure your source your new .bashrc (.profile on Mac) so all the virtualenvwrapper goodness will be available to you.

Getting started

First things first you need to checkout this repo:

$ git clone 

Create a new virtual environment called ""spaza"", activate it and make sure all requirements are installed:

$ mkvirtualenv --no-site-packages spaza
(spaza) $ pip install -r config/requirements.pip

Notice how the shell prompt has been updated to have a ""(spaza)"" proceeding ""$"" - this indicates that the virtual environment named "(spaza)" is active. To deactivate it use the following:

(spaza) $ deactivate

Likewise to reactivate it to continue development use the following command:

$ workon spaza
(spaza) $

Running Django the server

To run the server on your local machine on port 8000 use the following command:

(spaza) $ cd spaza
(spaza) $ python runserver

I suggest instead of using python to run the server directory, consider using ipython for the advanced debugging features it provides:

(spaza) $ cd spaza
(spaza) $ ipython runserver

You can now view your server by opening in your browser.

Running XMPP Server

  1. Create virtual environment: mkvirtualenv --no-site-packages spaza
  2. Install requirements: pip install -r config/requirements.pip
  3. Start twisted server: twistd --pidfile=tmp/ -n xmpp --xmpp-username=some-jabber-username
  4. Enter password when prompted: some-jabber-password
  5. Add some-jabber-username as jabber contact in gtalk/etc.
  6. Send $start and follow menus

Using USSD

  1. Dial 1203647773532893# (This won't work, you will need to sort out your own providers)
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more