prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add whitenoise and serve static files from the app
  Add whitenoise to serve static files in the dev (and stage?) instances. 
  
  In production we'll probably go with another more efficient approach which is being investigated in #2949.
  
  Whitenoise activation should be configurable via the `ENABLE_WHITENOISE` env variable.
  
  </issue>
  <code>
  [start of wsgi/app.py]
  1 """
  2 WSGI config for kitsune project.
  3 
  4 It exposes the WSGI callable as a module-level variable named ``application``.
  5 
  6 For more information on this file, see
  7 https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
  8 """
  9 import os
  10 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kitsune.settings')  # NOQA
  11 
  12 from django.core.wsgi import get_wsgi_application
  13 
  14 import newrelic.agent
  15 from decouple import config
  16 from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
  17 
  18 # For django-celery
  19 os.environ['CELERY_LOADER'] = 'django'
  20 
  21 application = get_wsgi_application()
  22 application = Sentry(application)
  23 
  24 # Add NewRelic
  25 newrelic_ini = config('NEW_RELIC_CONFIG_FILE', default='newrelic.ini')
  26 newrelic_license_key = config('NEW_RELIC_LICENSE_KEY', default=None)
  27 if newrelic_ini and newrelic_license_key:
  28     newrelic.agent.initialize(newrelic_ini)
  29     application = newrelic.agent.wsgi_application()(application)
  30
  [end of wsgi/app.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/wsgi/app.py b/wsgi/app.py
  --- a/wsgi/app.py
  +++ b/wsgi/app.py
  @@ -21,6 +21,10 @@
   application = get_wsgi_application()
   application = Sentry(application)
   
  +if config('ENABLE_WHITENOISE', default=False, cast=bool):
  +    from whitenoise.django import DjangoWhiteNoise
  +    application = DjangoWhiteNoise(application)
  +
   # Add NewRelic
   newrelic_ini = config('NEW_RELIC_CONFIG_FILE', default='newrelic.ini')
   newrelic_license_key = config('NEW_RELIC_LICENSE_KEY', default=None)
  
verification_info: {"golden_diff": "diff --git a/wsgi/app.py b/wsgi/app.py\n--- a/wsgi/app.py\n+++ b/wsgi/app.py\n@@ -21,6 +21,10 @@\n application = get_wsgi_application()\n application = Sentry(application)\n \n+if config('ENABLE_WHITENOISE', default=False, cast=bool):\n+    from whitenoise.django import DjangoWhiteNoise\n+    application = DjangoWhiteNoise(application)\n+\n # Add NewRelic\n newrelic_ini = config('NEW_RELIC_CONFIG_FILE', default='newrelic.ini')\n newrelic_license_key = config('NEW_RELIC_LICENSE_KEY', default=None)\n", "issue": "Add whitenoise and serve static files from the app\nAdd whitenoise to serve static files in the dev (and stage?) instances. \r\n\r\nIn production we'll probably go with another more efficient approach which is being investigated in #2949.\r\n\r\nWhitenoise activation should be configurable via the `ENABLE_WHITENOISE` env variable.\n", "before_files": [{"content": "\"\"\"\nWSGI config for kitsune project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/\n\"\"\"\nimport os\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kitsune.settings')  # NOQA\n\nfrom django.core.wsgi import get_wsgi_application\n\nimport newrelic.agent\nfrom decouple import config\nfrom raven.contrib.django.raven_compat.middleware.wsgi import Sentry\n\n# For django-celery\nos.environ['CELERY_LOADER'] = 'django'\n\napplication = get_wsgi_application()\napplication = Sentry(application)\n\n# Add NewRelic\nnewrelic_ini = config('NEW_RELIC_CONFIG_FILE', default='newrelic.ini')\nnewrelic_license_key = config('NEW_RELIC_LICENSE_KEY', default=None)\nif newrelic_ini and newrelic_license_key:\n    newrelic.agent.initialize(newrelic_ini)\n    application = newrelic.agent.wsgi_application()(application)\n", "path": "wsgi/app.py"}]}