Issues deploying django-nvd3 charts on heroku -


did 1 try deploy django-nvd3 charts on heroku success? trying deploy django application using nvd3 charts on heroku whole weekend no luck. works fine in dev enviornment (ubuntu). when try push heroku, facing sorts of errors.

on dev environment installed npm (this includes node.js) , later installed bower , installed django-bower; suggested on https://github.com/areski/django-nvd3. tried different charts , work okay, no issues

however, when trying push code on heroku, hitting quite few errors. fixing 1 leads others. wondering, if need add package.json (to list npm dependencies bower) , bower.json (to list bower dependencies d3, nvd3) files repo, in first place?

i googled lot documentation gives gun-shot info on this(django, nvd3, bower, npm/node married together), couldn't see any

note: try post heroku logs more info.

bower.json given like:

{ "dependencies": {         "d3": "3.3.6",     "nvd3": "1.1.12-beta"   } 

package.json given like:

"engines": {         "node": "0.11.11",         "npm": "1.3.25"      },   "dependencies": {         "bower": "1.3.1"      } 

errors encountered like:

1. gunicorn not recognized - resolved 2. nameerror: name 'databases' not defined in settings.py - resolved 3. django.core.management not found - resolved 4. git error: fatal: head corrupted/ cannot deployed on heroku - resolved 5. listening @ localhost 127.0.0.1:8000 - working on this. think databases setting pointing @ dj_database_url.config(default=['database_url'])?? 

is there git repo django+nvd3charts deployed on heroku? can have @ configuration?

also looking @ https://github.com/areski/django-nvd3; not see bower dependencies or npm dependencies listed here, work this?

or, can heroku automatically install npm/bower without package.json , can @ settings.py file , looking @ bower dependencies, heroku install dependencies out need bower.json file listing d3, nvd3 dependencies? suppose not case, far see

please suggest

i wrote blog post find here: https://mattdoesstuff.wordpress.com/2015/04/10/getting-npm-d3-nvd3-django-bower-django-bower-nvd3-and-heroku-to-play-nicely-together/

use django-nvd3 , django-bower

pip install django-nvd3 django-bower pip freeze > requirements.txt git add . git commit -m "don't forget requirements.txt!" 

use multi-buildpack

heroku config:set buildpack_url=https://github.com/ddollar/heroku-buildpack-multi.git 

use node , python buildpacks together

# ./.buildpacks https://github.com/heroku/heroku-buildpack-nodejs.git https://github.com/amanjain/heroku-buildpack-python-with-django-bower.git 

download bower using npm

# ./package.json {"private": true,"dependencies": {"bower": "1.4.1"}} 

user django-bower collect assets

# ./bin/post_compile # install bower components ./manage.py bower_install 

tell django find bower

# settings.py ... import os  application_dir = os.path.dirname(globals()['__file__']) heroku = bool(os.environ.get('database_url'))  bower_components_root = os.path.join(application_dir, 'components')  # find local bower bower_path = '/usr/local/bin/bower'  if heroku:     bower_path = '/app/node_modules/bower/bin/bower'  bower_installed_apps = (     'd3#3.3.13',     'nvd3#1.7.1', ) ... 

credits * http://www.rawsrc.com/using-django-bower-on-heroku/ * https://github.com/ddollar/heroku-buildpack-multi.git * https://github.com/areski/django-nvd3


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -