Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Build Status

What is Collab?

Collab is a Django project with a standard set of configurations to provide services to reusable apps.

What is included?

Core Collab comes with:

Setting up a development environment


  • Python (>= 2.6)
  • Mysql

Follow these steps to set up collab:

  1. Clone this repo or a fork of it

    git clone
    cd collab
  2. Make sure you have pip and virtualenv installed:

    easy_install -U pip
    pip install -U pip
    pip install -U virtualenv

    You may have to prepend these commands with sudo, depending on your setup.

  3. Create a virtual environment for the project and install the necessary packages:

    virtualenv --no-site-packages --distribute venv    # creates the virtualenv named "venv"
    source venv/bin/activate                           # activates (places you in) the virtualenv
    pip install -r requirements.txt                    # installs main required packages for collab
    pip install -r requirements-test.txt               # installs packages required for testing

    Important Note: Anytime you restart your terminal and return to work on this project, you will need to reactivate the virtualenv by running the source venv/bin/activate command from the collab root. See virtualenv for more details.

  4. Copy collab/ to collab/ and edit to match your current environment. In particular, update the DATABASES information. You will need to create the database you choose for the default schema.

    • Edit DATABASES (in the else block) to set the database user and password to whatever user you have set up in MySQL (probably root with no password, since it's local to your machine).
    • Set a SECRET KEY. This can be any string you want.
    • If you have already set up any other child apps besides the four required, uncomment them in INSTALLED_APPS.
  5. Set up the database:

    mysql.server start
    mysql -u <user> -e 'create database collab'
    python ./ syncdb
    python ./ syncdb --noinput --migrate
    python ./ loaddata core/fixtures/core-test-fixtures.json

    Optionally, you can create random users for local testing.

    python ./ create_users <number of users>
  6. Run the Django server:

    python ./ runserver
  7. Go to http://localhost:8000 in your browser and log in with user and password 1.

  8. You are a winner!


To run tests:

python test

Models should have a robust set of unit tests.

When writing unit tests for models, try to separate functionality which needs the DB from functionality which does not. Aim to avoid hitting the DB in a test for optimal results.

Views should have unit testing for functional parts of them: that is, try to extract functionality without side effects from the view functions, and then test those extracted functions.

Views should have system testing using WebTest for page interaction.


Collab is a Django project with a standard set of configurations to provide services to reusable apps.







No packages published