Django error in Heroku: “Please supply the ENGINE value”

前端 未结 6 798
广开言路
广开言路 2021-01-04 20:14

I read and apply \"Getting started with Django on Heroku\" tutorial but ran into problem while syncing db:

raise ImproperlyConfigured(\"settings.DATABASES is         


        
6条回答
  •  青春惊慌失措
    2021-01-04 20:46

    it is a little late ; but you just delete all default django database settings lines ; and add heroku's one.

    it will work correctly

    ** edit ** or simply you can use `socket.gethostname().

    example :

    if socket.gethostname() == 'xx':
        DATABASE_SETTINGS ={ }
    
    elif socket.gethostname() == 'xxx':
        another database settings...
    

    so you can run your project under multiple hosts.

提交回复
热议问题