Skip to content
A social coding/code sharing site oriented around small, reusable snippets
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Repository for unnamed code catalog project.

To get started:

First, install Python 2.x (current version as of this document is 2.7).

For Linux:

Install django and the django package south.  Debian packages 
python-django, python-django-south.  Also get python-pip, the package manager.  Then

% sudo pip install haystack
% sudo pip install whoosh

For Windows:

Note: Make sure you have C:\Python27 or wherever you downloaded it in your path environment variable!

Download the following python packages:
setuptools (

You can then download pip ( and then install the following packages (pip install <package>, after adding pip to your path):

(You can also install manually
After extracting each one, navigate to the extracted folder in a command prompt. Then
> python install)

django (
django-south (
django-haystack (
django whoosh (

This should install each package into your python home directory.


% cd catalog
% python syncdb
(creates a local sqlite database -- will ask you some questions)
% python migrate

(prepares database schema (we're doing this to make it easy to migrate schemas later))
% python runserver

You can also use the bat files:

Now the server will be running on port 8000.  So browse to:


And it will ask you for a new snippet.  Write a python function.  After you submit and
the description page comes up, click the little blue edit buttons to expand the description.

After you have some snippets,

% python rebuild_index

to build the search index, then search by browsing to:


To update the server to the most recent version of CodeCatalog from the repo:

Log into through PuTTY/SSH
User: ubuntu

% cd CodeCatalog
% hg fetch

If you changed the database schema:

% cd catalogserver
% ./ migrate

% sudo service apache2 reload


% ./

This script does everything above automatically.

To update the schema.xml:

% cd CodeCatalog/server-scripts
% sudo cp schema.xml /etc/solr/conf

% sudo service tomcat6 restart

% cd CodeCatalog/catalogserver
% python rebuild_index
You can’t perform that action at this time.