setting database: postgresql in django 1.8 in heroku -


i have been struggling issue whole days while no solutions @ all. post here.

i trying set blog website in heroku via django 1.8 uses python 3.4.3. follows instructions heroku website here.

i use "foreman start" run django project in mac , installed dependence.

part of setting.py file involving database looks like:

import dj_database_url databases = {} databases['default'] = dj_database_url.config() 

then got error: improperlyconfigured @ /settings.databases improperly configured. please supply engine value.

then modify files adding 1 line supplying engine value:

import dj_database_url databases = {} databases['default'] = dj_database_url.config() databases['default']['engine'] = 'django.db.backends.postgresql_psycopg2' 

based on this post answered or arbel, should work. got error: improperlyconfigured @ /settings.databases improperly configured. please supply name value.

what should next? django project simple , not involve database operations(may need in future). want make works on heroku. thanks!

do need create database continue? want make webpage works.

thanks guys help, specially souldeux.

update:

i have fixed issue using souldeux's method providing more informations database. here want emphasis seems code original heroku tutorial not work django 1.8:

import dj_database_url   ####not working case databases = {} databases['default'] = dj_database_url.config() 

initially did not create database because think not necessary simple projects, based on understanding obtained heroku tutorial. need create database in heroku make works. tutorial here. need run "heroku config -s | grep heroku_postgresql" database information. format like:

scheme://username:password@host:port/database 

so can 'database', 'username', 'password', etc.

afterwards, modify 'settings.py' according souldeux, run following codes:

git add . git commit -m "ready go heroku" git push heroku master heroku run python manage.py syncdb 

now works. other issues arise webpages not show images... anyway solved. please confirm solutions, thanks.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -