mkdir cafb_site
cd cafb_site
git clone https://github.com/cafbdk/cafb_site_with_restapi.git
cd cafb_site_with_restapi
Set up your local virtual env with virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
Add your nutrix api key and api_id to sample.env and rename sample.env to .env
mv sample.env .env
python manage.py migrate
python manage.py createsuperuser
python manage.py load_initial_data
Install here https://toolbelt.heroku.com/
heroku local
Open http://localhost:5000/ in your browser
heroku create
heroku config:add BUILDPACK_URL=https://github.com/amanjain/heroku-buildpack-python-with-django-bower.git
heroku config:add api_key=(insert nutrix api key here)
`heroku config:add api_id=(insert nutrix api id here)``
git push heroku master
heroku run python manage.py migrate
heroku run python manage.py createsuperuser
heroku run python manage.py load_initial_data
heroku open
No tokens or keys required for this version of the API
https://cafbsite.herokuapp.com/api/
https://cafbsite.herokuapp.com/api/auth/upc=52009830171/?format=json
Should return {"gtin_code":"52009830171","gtin_name":"Honey","created":"2016-03-06T04:34:59.001637Z"}