Django USDA Demo
A demo project using Django USDA.
Installation
- Create a new directory and open it:
mkdir ~/django-usda
cd ~/django-usda
- Clone this repository:
git clone https://github.com/Zundrium/django-usda-demo.git
- Create a virtual enviornment and activate it:
virtualenv demoenv
source demoenv/bin/activate
- Go into the project directory:
cd django-usda-demo
- Install required packages:
pip install -r requirements.txt
- Install Django USDA
pip install git+https://github.com/zundrium/django-usda.git
-
Download the ASCII version of the 27th release of the USDA Nutrient Database.
-
Create the tables and import the zip file (This can take up to 10 minutes):
python manage.py migrate
python manage.py import_r27 <path_to_zipfile>
- Run the development server
python manage.py runserver
- Go to
http://localhost:8000/demo/
to see the demo.