prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Demo is broken for 0.1.6
  ## Description
  <!-- A clear and concise description of what the bug is. -->
  
  The demo can't be deployed with the current `master` branch (0.1.6)
  
  The reasons are:
  
  - We didn't add the fix to the demo settings in #3499 (just to prod), and
  - We have an extra dependency in the demo setup which we need to build in but the current `Dockerfile` doesn't support that.
  
  ## Expected behavior
  <!-- A clear and concise description of what you expected to happen. -->
  
  We should be able to demo version 0.1.6 on our demo site.
  
  </issue>
  <code>
  [start of demo/settings.py]
  1 from config.settings.common_settings import *  # noqa
  2 from decouple import config as decouple_config
  3 
  4 INSTALLED_APPS += [  # noqa
  5     "demo",
  6     "health_check",
  7 ]
  8 
  9 MIDDLEWARE += [  # noqa
  10     "demo.middleware.LiveDemoModeMiddleware",
  11 ]
  12 
  13 MATHESAR_MODE = 'PRODUCTION'
  14 MATHESAR_LIVE_DEMO = True
  15 MATHESAR_LIVE_DEMO_USERNAME = decouple_config('MATHESAR_LIVE_DEMO_USERNAME', default=None)
  16 MATHESAR_LIVE_DEMO_PASSWORD = decouple_config('MATHESAR_LIVE_DEMO_PASSWORD', default=None)
  17 
  18 MATHESAR_DEMO_TEMPLATE = 'mathesar_demo_template'
  19 MATHESAR_DEMO_ARXIV_LOG_PATH = decouple_config(
  20     'MATHESAR_DEMO_ARXIV_LOG_PATH',
  21     default='/var/lib/mathesar/demo/arxiv_db_schema_log'
  22 )
  23 BASE_TEMPLATE_ADDITIONAL_SCRIPT_TEMPLATES += ['demo/analytics.html'] # noqa
  24 ROOT_URLCONF = "demo.urls"
  25
  [end of demo/settings.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/demo/settings.py b/demo/settings.py
  --- a/demo/settings.py
  +++ b/demo/settings.py
  @@ -10,6 +10,9 @@
       "demo.middleware.LiveDemoModeMiddleware",
   ]
   
  +
  +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
  +
   MATHESAR_MODE = 'PRODUCTION'
   MATHESAR_LIVE_DEMO = True
   MATHESAR_LIVE_DEMO_USERNAME = decouple_config('MATHESAR_LIVE_DEMO_USERNAME', default=None)
  
verification_info: {"golden_diff": "diff --git a/demo/settings.py b/demo/settings.py\n--- a/demo/settings.py\n+++ b/demo/settings.py\n@@ -10,6 +10,9 @@\n     \"demo.middleware.LiveDemoModeMiddleware\",\n ]\n \n+\n+SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')\n+\n MATHESAR_MODE = 'PRODUCTION'\n MATHESAR_LIVE_DEMO = True\n MATHESAR_LIVE_DEMO_USERNAME = decouple_config('MATHESAR_LIVE_DEMO_USERNAME', default=None)\n", "issue": "Demo is broken for 0.1.6\n## Description\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\nThe demo can't be deployed with the current `master` branch (0.1.6)\r\n\r\nThe reasons are:\r\n\r\n- We didn't add the fix to the demo settings in #3499 (just to prod), and\r\n- We have an extra dependency in the demo setup which we need to build in but the current `Dockerfile` doesn't support that.\r\n\r\n## Expected behavior\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\nWe should be able to demo version 0.1.6 on our demo site.\n", "before_files": [{"content": "from config.settings.common_settings import *  # noqa\nfrom decouple import config as decouple_config\n\nINSTALLED_APPS += [  # noqa\n    \"demo\",\n    \"health_check\",\n]\n\nMIDDLEWARE += [  # noqa\n    \"demo.middleware.LiveDemoModeMiddleware\",\n]\n\nMATHESAR_MODE = 'PRODUCTION'\nMATHESAR_LIVE_DEMO = True\nMATHESAR_LIVE_DEMO_USERNAME = decouple_config('MATHESAR_LIVE_DEMO_USERNAME', default=None)\nMATHESAR_LIVE_DEMO_PASSWORD = decouple_config('MATHESAR_LIVE_DEMO_PASSWORD', default=None)\n\nMATHESAR_DEMO_TEMPLATE = 'mathesar_demo_template'\nMATHESAR_DEMO_ARXIV_LOG_PATH = decouple_config(\n    'MATHESAR_DEMO_ARXIV_LOG_PATH',\n    default='/var/lib/mathesar/demo/arxiv_db_schema_log'\n)\nBASE_TEMPLATE_ADDITIONAL_SCRIPT_TEMPLATES += ['demo/analytics.html'] # noqa\nROOT_URLCONF = \"demo.urls\"\n", "path": "demo/settings.py"}]}