简体   繁体   中英

Chatterbot Django and Heroku (Issues Running Example)

I've had a couple of issues now and I've nearly got the Chatterbot example working for Django running on Heroku.

Here is my example page. https://polar-basin-92507.herokuapp.com/

looking at the log the issue seems to be

OperationalError: no such table: django_chatterbot_statement

Full log https://hastebin.com/mucanobuki.sql

git source https://github.com/gunthercox/ChatterBot/tree/master/examples/django_app/example_app

From what I can tell their example was setup to use sqlite3 but heroku doesn't support that and that I need to somehow switch it over to postgres? Not sure and this is where I'd like some guidance.

You need to setup Postgresql in heroku. Just add these lines in your settings.py file found here

import dj_database_url
db_from_env = dj_database_url.config()
DATABASES['default'].update(db_from_env)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM