File tree Expand file tree Collapse file tree
chatterbot/ext/django_chatterbot Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 - name : Run tests for Django example app
5959 run : |
6060 python -m pip install "django<=4.1"
61- python runtests.py
62- python examples/django_example/manage.py test examples/django_example/
61+ python -Wonce runtests.py
62+ python -Wonce examples/django_example/manage.py test examples/django_example/
6363 # --------------------------------------------------------------
6464 # TODO: Fix & re-enable later
6565 # https://github.com/marketplace/actions/coveralls-github-action
Original file line number Diff line number Diff line change @@ -6,3 +6,10 @@ class DjangoChatterBotConfig(AppConfig):
66 name = 'chatterbot.ext.django_chatterbot'
77 label = 'django_chatterbot'
88 verbose_name = 'Django ChatterBot'
9+
10+ def ready (self ):
11+ from chatterbot .ext .django_chatterbot import settings as defaults
12+ from django .conf import settings
13+
14+ settings .CHATTERBOT = getattr (settings , 'CHATTERBOT' , {})
15+ settings .CHATTERBOT .update (defaults .CHATTERBOT_DEFAULTS )
Original file line number Diff line number Diff line change 55from chatterbot import constants
66
77
8- CHATTERBOT_SETTINGS = getattr (settings , 'CHATTERBOT' , {})
8+ CHATTERBOT = getattr (settings , 'CHATTERBOT' , {})
99
1010CHATTERBOT_DEFAULTS = {
1111 'name' : 'ChatterBot' ,
1212 'storage_adapter' : 'chatterbot.storage.DjangoStorageAdapter' ,
1313 'django_app_name' : constants .DEFAULT_DJANGO_APP_NAME
1414}
1515
16- CHATTERBOT = CHATTERBOT_DEFAULTS .copy ()
17- CHATTERBOT .update (CHATTERBOT_SETTINGS )
16+ CHATTERBOT .update (CHATTERBOT_DEFAULTS )
You can’t perform that action at this time.
0 commit comments