This document assumes you are familiar with Python and Django.
- Python 2.6 or a higher release of 2.x
- Django 1.3.1
- South 0.7.3
- django-disqus 0.4.1
- django-imagekit 0.4.0
- django-taggit 0.9.3
- akismet 0.2.0
- PIL 1.1.7
- django_navbar 0.3.0
- django-profiles 0.2
- feedparser 4.1
- html5lib 0.90
- whoosh 1.8.4
- django-haystack 1.2.4
- django-taggit-templatetags 0.4.6dev
- reportlab 2.5
- django-registration 0.8-alpha-1
- django-relationships 0.3.0
- django-ratings 0.3.6
- django-grappelli 2.3.7
- webtest 1.2.3 used for testing
- django-webtest 1.4.1 used for testing
- django-sentry 1.10.1 used for debugging and troubleshooting errors
- django-indxer 0.3.0 used by django-sentry
- django-paging 0.2.4 used by django-sentry
- django-extensions 0.6 extra management commands
- django-rosetta 0.6.2 used to ease translations
- django-debug-toolbar 0.8.5 used to help troubleshooting
- django-tastypie 0.9.11
- lxml 2.3
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
Note
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.
- 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
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 postgres_settings.py to settings.py.
- Then skip running the migrate command from the Required Data section below.
- After running the ./manage.py syncdb command from the Required Data section, edit the settings.py file and remove the # from in front of the word south in the file and save it.
- Then run the command ./manage.py migrate --fake.
- Continue with the rest of the instructions as normal.
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 --all ./manage.py migrate --fake ./manage.py loaddata fixtures/navbar_about_data.json
Note
Before you run this make sure you have setup your database in the settings.py file. For more information on this see :ref:`database-config`
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:
./manage.py 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:
./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:
http://yoursite:8000
Note
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.
You will need to set up your site name before you can use certain features. See :ref:`site-name`