title: Django Error: 'myproject.wsgi.application' could not be loaded
body: <p>I'm currently trying to test my Django application, which will eventually be deployed to Heroku. When testing locally, I'm running into the error:</p>
  <pre><code>django.core.exceptions.ImproperlyConfigured: WSGI application 
  'foodForThought.wsgi.application' could not be loaded; Error importing module.
  </code></pre>
  <p>My wgsi.py file is configured as:</p>
  <pre><code>import os
  import signal
  import sys
  import traceback
  import time
  
  from django.core.wsgi import get_wsgi_application
  from whitenoise.django import DjangoWhiteNoise
  
  os.environ.setdefault(&quot;DJANGO_SETTINGS_MODULE&quot;, &quot;foodForThought.settings&quot;)
  
  application = get_wsgi_application()
  application = DjangoWhiteNoise(application)
  </code></pre>
  <p>And my settings.py file is configured as:</p>
  <pre><code>import os
  
  # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  
  ...
  
  # Application definition
  
  INSTALLED_APPS = [
      'recipe.apps.RecipeConfig',
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'foodForThought'
  ]
  
  MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  ROOT_URLCONF = 'foodForThought.urls'
  
  ...
  
  WSGI_APPLICATION = 'foodForThought.wsgi.application'
  
  ...
  </code></pre>
  <p>I'm currently using Django 1.11.7 and testing in a venv. What's causing this issue to occur?</p>