recipi - nutrition database and meal planner.¶
$ Create your virtualenv $ mkvirtualenv recipi $ # Clone repository $ git clone email@example.com:recipi/recipi.git $ # Activate Environment and install. Note that this might take a while $ # and actually downloads tons of stuff (used for NLTK) $ workon recipi $ make develop $ # run tests $ make test
Create a new file
src/recipi/settings.py with the following content:
from recipi.conf.development import *
Edit and adapt this file to your specific environment.
Setup the database¶
Please note that recipi was developed with PostgreSQL in mind. It may not be performant enough on other datastores or may not even support them.
Create an empty new PostgreSQL database (any other supported by Django works too).
$ createdb recipi_dev
You might need to apply a postgresql user (
createdb -U youruser) e.g
for proper permissions.
$ python manage.py migrate
$ # Create a new super user $ python manage.py createsuperuser
Import nutrition data and recipes¶
To import a pre-defined fixture:
$ gunzip resources/fixtures/food.json.gz $ python manage.py loaddata resources/fixtures/food.json
Or to freshly import all data:
$ python import.py
This will take some time...
Run the server, celery and other services¶
Other services being used:
- Celery, is being used to run [regular] tasks, e.g for mail output.
- gulp-sass, is being used to compile our scss files and the foundation framework.
To start all of them (including the tls-server):
$ gulp serve
Our celery configuration requires redis to be installed and running. Please make sure it’s up!
Run the test-suite¶
$ make test