Django app: Run button gives error, but running server from console is fine



I am running a Django app that I have been working with from the original C9 setup. When I type into the console “python runserver $IP:$PORT”, my app works well at the link However, when I click the ‘Run’ button, I get the below error. I would like the Run button to work just like the console command. Please help!

Traceback (most recent call last):
File “”, line 10, in
File “/usr/local/lib/python2.7/dist-packages/django/core/management/”, line 350, in execute_from_command_line
File “/usr/local/lib/python2.7/dist-packages/django/core/management/”, line 342, in execute
File “/usr/local/lib/python2.7/dist-packages/django/core/management/”, line 348, in run_from_argv
self.execute(*args, **cmd_options)
File “/usr/local/lib/python2.7/dist-packages/django/core/management/”, line 399, in execute
output = self.handle(*args, **options)
File “/usr/local/lib/python2.7/dist-packages/django/core/management/commands/”, line 89, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File “/usr/local/lib/python2.7/dist-packages/django/db/migrations/”, line 20, in init
self.loader = MigrationLoader(self.connection)
File “/usr/local/lib/python2.7/dist-packages/django/db/migrations/”, line 49, in init
File “/usr/local/lib/python2.7/dist-packages/django/db/migrations/”, line 176, in build_graph
self.applied_migrations = recorder.applied_migrations()
File “/usr/local/lib/python2.7/dist-packages/django/db/migrations/”, line 65, in applied_migrations
File “/usr/local/lib/python2.7/dist-packages/django/db/migrations/”, line 52, in ensure_schema
File “/usr/local/lib/python2.7/dist-packages/django/db/backends/base/”, line 231, in cursor
cursor = self.make_debug_cursor(self._cursor())
File “/usr/local/lib/python2.7/dist-packages/django/db/backends/dummy/”, line 21, in complain
raise ImproperlyConfigured("settings.DATABASES is improperly configured. "
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

Django server not displaying app

There are several possible issues:

  • run button calls python migrate before runserver, maybe the error happens when doing migrate?
  • maybe you have modified .bashrc or other similar file, and environments for interactive and noninteractive terminals are different, so version invoked with run button misses some variables.
  • do you use same python executable in both cases, or do you use virtualenv or something similar?


Yes you are right that

python migrate

throws the error that I pasted in my original question. I am using MongoDB, so I don’t need to migrate. I am not sure why this just recently started happening, as I was using the Run button just fine earlier. Seems to coincide with when I was messing with settings for my first Heroku deployment.

I am not using a virtualenv. I am using the default Cloud9 environment.

The DATABASES section of my looks like this:

default’: {
ENGINE’: ‘django.db.backends.dummy’


you can edit the runner and remove the migrate part.