import os
from os.path import abspath, dirname
from sys import path

from django.core.wsgi import get_wsgi_application

SITE_ROOT = dirname(dirname(abspath(__file__)))
path.append(SITE_ROOT)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "craigomatic.settings")
application = get_wsgi_application()

import os
from os.path import abspath, dirname
from sys import path

from django.core.wsgi import get_wsgi_application

from whitenoise.django import DjangoWhiteNoise

SITE_ROOT = dirname(dirname(abspath(__file__)))
path.append(SITE_ROOT)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "craigomatic.settings")
application = get_wsgi_application()
application = DjangoWhiteNoise(application)

Integrate whitenoise with the Django application
Integrate whitenoise with the Django application

This allows Django to serve static files in production.

  import os
  from os.path import abspath, dirname
  from sys import path
  
  from django.core.wsgi import get_wsgi_application
  
+ from whitenoise.django import DjangoWhiteNoise
+ 
  SITE_ROOT = dirname(dirname(abspath(__file__)))
  path.append(SITE_ROOT)
  
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "craigomatic.settings")
  application = get_wsgi_application()
+ application = DjangoWhiteNoise(application)
  
Integrate whitenoise with the Django application
## Code Before:
import os
from os.path import abspath, dirname
from sys import path

from django.core.wsgi import get_wsgi_application

SITE_ROOT = dirname(dirname(abspath(__file__)))
path.append(SITE_ROOT)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "craigomatic.settings")
application = get_wsgi_application()

## Instruction:
Integrate whitenoise with the Django application
## Code After:
import os
from os.path import abspath, dirname
from sys import path

from django.core.wsgi import get_wsgi_application

from whitenoise.django import DjangoWhiteNoise

SITE_ROOT = dirname(dirname(abspath(__file__)))
path.append(SITE_ROOT)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "craigomatic.settings")
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
