ab9ec75 Feb 25, 2012
242 lines (180 sloc) 8.57 KB


This document assumes you are familiar with Python and Django.



Python Virtual Environment

The easiest way to install OpenEats2, is to create a python virtual environment. This allows for keeping all the packages for OpenEats2 in a separate place. Saving the hassle of dealing with application dependencies.

Installing virtualenv

To install virtualenv from the command line type:

pip install virtualenv

You will also want to install the virtualenvwrapper package to make management of the virtual environment simpler

To install virtualenvwrapper from the command line type:

pip install virtualenvwrapper

Creating the virtualenv

To create the skeleton virtualenv run the following commands:

export WORKON_HOME=~/Envs
mkdir -p $WORKON_HOME
source /usr/local/bin/
mkvirtualenv openeats --no-site-packages
workon openeats


You can set your workon home directory anywhere you want it doesn't have to be in the Envs directory The may not be located in /usr/local/bin it varies by operating system. For help with virtualenvwrapper vist their site.


  • Download the latest package from github
  • Unzip the files into a directory that your web server can access
  • Make sure the directory is called openeats or python won't be able to find it
  • Install the required packages

Installing Requirements packages

To install all the packages that OpenEats2 requires perform the following steps.

  • Activate your virtualenv

  • Change to the directory that you unzipped the OpenEats2 files into

  • Run the following command:

    pip install -r OE2_Requirements.txt


OpenEats2 has been tested with MySQL and SQLite and minimal testing has been done with PostgreSQL_ Technically it should be able to work under any django supported database. SQLite is built into python and does not require any additional software.


To install the MySQL-Python module perform the following steps

  • Activate your OpenEats2 virtualenv

  • Run the following command:

    pip install mysql-python


To install the Postgres module perform the following steps

  • Activate your OpenEats2 virtualenv

  • Run the following command:

    pip install psycopg2

There is a small issue with PostgresSQL that will cause you an error when loading the data. To get around this issue perform the following steps;

  • Copy the to
  • Then skip running the migrate command from the Required Data section below.
  • After running the ./ syncdb command from the Required Data section, edit the file and remove the # from in front of the word south in the file and save it.
  • Then run the command ./ migrate --fake.
  • Continue with the rest of the instructions as normal.

Load Initial Data

OpenEats2 comes with default data that needs to be loaded into the database.

Required Data

Running the following command from the OpenEats2 directory, should load the required data:

./ syncdb --all
./ migrate --fake
./ loaddata fixtures/navbar_about_data.json


Before you run this make sure you have setup your database in the file. For more information on this see :ref:`database-config`

Optional Data

You can pre-load courses and cuisines by running the following commands from the OpenEats2 directory:

./ loaddata recipe_groups/fixtures/course_data.json
./ loaddata recipe_groups/fixtures/cuisine_data.json

Collecting Static Files

To collect the static files from the third party applications run the following command:

./ collectstatic


After the install you can run the following command to start the internal Django webserver. This will allow you to test your site prior to setting up a "real" webserver such as Apache:

./ runserver 8000

This will bind the webserver to port 8000 on otherwise known as localhost. If you are deploying OpenEats2 to a remote server and not your local computer run the following command instead:

./ runserver

You should then be able to access your new OpenEats2 site by pointing your browser to your URL with port 8000:



You should not run OpenEats2 in production with the built in webserver. You will want to setup Apache or Ngnix Check out the Django Apache WSGI document for more info.

Site Name

You will need to set up your site name before you can use certain features. See :ref:`site-name`