title: Django Server Error 500 after changing Debug to False
body: <p>Am trying to deploy Django app to heroku. Followed this <a href="https://devcenter.heroku.com/articles/deploying-python" rel="nofollow">tutorial</a></p>
  
  <p>On running heroku local web (or even python manage.py runserver) and invoking the server, getting a Server Error 500.  Help me out to resolve this error.</p>
  
  <p>Here's my <code>settings.py</code> file. [Allowed hosts is set to * for testing]</p>
  
  <pre><code># SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = False
  
  ALLOWED_HOSTS = ['*']
  INSTALLED_APPS = [
  'django.contrib.admin',
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  'myapp',
  ]
  
  MIDDLEWARE_CLASSES = [
  'django.middleware.security.SecurityMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.middleware.csrf.CsrfViewMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  'django.contrib.messages.middleware.MessageMiddleware',
  'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3',
          'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
      }
  }
  # Update database configuration with $DATABASE_URL.
  
  db_from_env = dj_database_url.config(conn_max_age=500)
  DATABASES['default'].update(db_from_env)
  </code></pre>