title: ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value
body: <p>I'm in the midst of setting up my Django project on Heroku. I have been following the documentation, but when I <code>foreman start</code> I receive an error that I can't quite figure out. I have set up my engine files, but it doesn't seem to want to work.</p>
  <p><strong>Full traceback:</strong></p>
  <pre class="lang-py prettyprint-override"><code>Traceback (most recent call last):
    File &quot;manage.py&quot;, line 10, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File &quot;/Users/nir/nirla/venv/lib/python2.7/site-packages/django/core/management/__init__.py&quot;, line 399, in execute_from_command_line
      utility.execute()
    File &quot;/Users/nir/nirla/venv/lib/python2.7/site-packages/django/core/management/__init__.py&quot;, line 392, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File &quot;/Users/nir/nirla/venv/lib/python2.7/site-packages/django/core/management/base.py&quot;, line 242, in run_from_argv
      self.execute(*args, **options.__dict__)
    File &quot;/Users/nir/nirla/venv/lib/python2.7/site-packages/django/core/management/base.py&quot;, line 285, in execute
      output = self.handle(*args, **options)
    File &quot;/Users/nir/nirla/venv/lib/python2.7/site-packages/django/core/management/base.py&quot;, line 415, in handle
      return self.handle_noargs(**options)
    File &quot;/Users/nir/nirla/venv/lib/python2.7/site-packages/django/core/management/commands/syncdb.py&quot;, line 57, in handle_noargs
      cursor = connection.cursor()
    File &quot;/Users/nir/nirla/venv/lib/python2.7/site-packages/django/db/backends/__init__.py&quot;, line 160, in cursor
      cursor = self.make_debug_cursor(self._cursor())
    File &quot;/Users/nir/nirla/venv/lib/python2.7/site-packages/django/db/backends/dummy/base.py&quot;, line 15, in complain
      raise ImproperlyConfigured(&quot;settings.DATABASES is improperly configured. &quot;
  django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
  </code></pre>
  <p>Someone suggested using <code>./manage.py diffsettings</code> and showing the DATABASES part:</p>
  <pre><code>DATABASES = {'default': {'AUTOCOMMIT': True, 'ENGINE': 'django.db.backends.dummy', 'ATOMIC_REQUESTS': False, 'NAME': '', 'TEST_MIRROR': None, 'CONN_MAX_AGE': 0, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'TEST_COLLATION': None, 'PORT': '', 'HOST': '', 'USER': '', 'TEST_CHARSET': None, 'PASSWORD': '', 'OPTIONS': {}}}
  </code></pre>
  <p>I can't seem to figure out what it means, but it doesn't look right on the surface.</p>
  <p>Here is part of my <code>settings.py</code> that I think could be relevant to this problem:</p>
  <pre class="lang-py prettyprint-override"><code>import os
  import dj_database_url
  
  ON_HEROKU = os.environ.get('ON_HEROKU')
  HEROKU_SERVER = os.environ.get('HEROKU_SERVER')
  
  if ON_HEROKU:
      
      DATABASES = {
          'default': {
              'ENGINE': 'django.db.backends.postgresql_psycopg2',
              'NAME': 'postgresql',
          }
      }
  else:
      DATABASES = {
          'default': {
              'ENGINE': 'django.db.backends.sqlite3',
              'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
              'USER': '',
              'PASSWORD': '',
              'HOST': '',                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
              'PORT': '',  
          }
      }
  
  
  DATABASES['default'] =  dj_database_url.config()
  
  SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
  
  ALLOWED_HOSTS = ['*']
  
  STATIC_URL = '/static/'
  
  # only refers to the location where your static files should end up after running manage.py collectstatic. you shouldn't really need collectstatic) when developing locally
  STATIC_ROOT = 'staticfiles'
  
  
  STATICFILES_DIRS = (    
      os.path.join(BASE_DIR, '../static'),
  )
  
  </code></pre>