This document assumes you are familiar with Python and Django.
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.
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
To create the skeleton virtualenv run the following commands:
export WORKON_HOME=~/Envs mkdir -p $WORKON_HOME source /usr/local/bin/virtualenvwrapper.sh 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 virtualenvwrapper.sh may not be located in /usr/local/bin it varies by operating system. For help with virtualenvwrapper vist their site.
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 comes with default data that needs to be loaded into the database.
Running the following command from the OpenEats2 directory, should load the required data:
./manage.py syncdb ./manage.py migrate ./manage.py loaddata fixtures/navbar_about_data.json
Before you run this make sure you have setup your database in the settings.py file. For more information on this see Database
You can pre-load courses and cuisines by running the following commands from the OpenEats2 directory:
./manage.py loaddata recipe_groups/fixtures/course_data.json ./manage.py loaddata recipe_groups/fixtures/cuisine_data.json
To collect the static files from the third party applications run the following command:
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:
./manage.py runserver 8000
This will bind the webserver to port 8000 on 127.0.0.1 otherwise known as localhost. If you are deploying OpenEats2 to a remote server and not your local computer run the following command instead:
./manage.py runserver 0.0.0.0:8000
You should then be able to access your new OpenEats2 site by pointing your browser to your URL with port 8000: