prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Modify docker configuration to work on OSX
  Docker for Mac does not properly support the `network_mode: host` option for containers. In order to run the system on OSX, it will be necessary to network the containers using a bridged network:
  
  > By default Compose sets up a single network for your app. Each container for a service joins the default network and is both reachable by other containers on that network, and discoverable by them at a hostname identical to the container name."
  
  Rather than accessing other containers via a port on localhost, containers will  access each other using the instance name as the hostname. Port 80 will then be exposed from the nginx container to the host.
  
  </issue>
  <code>
  [start of csunplugged/config/settings/database_proxy.py]
  1 # -*- coding: utf-8 -*-
  2 """Django settings for connecting via Google Cloud SQL Proxy."""
  3 
  4 from .base import *  # noqa: F403
  5 
  6 
  7 # DATABASE CONFIGURATION
  8 # ----------------------------------------------------------------------------
  9 # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
  10 DATABASES = {
  11     "default": {
  12         "ENGINE": "django.db.backends.postgresql",
  13         "HOST": "localhost",
  14         "PORT": "5433",
  15         "NAME": "csunplugged",
  16         "USER": env("GOOGLE_CLOUD_SQL_DATABASE_USERNAME"),  # noqa: F405
  17         "PASSWORD": env("GOOGLE_CLOUD_SQL_DATABASE_PASSWORD"),  # noqa: F405
  18         "ATOMIC_REQUESTS": True,
  19     }
  20 }
  21 
  22 SECRET_KEY = env("DJANGO_SECRET_KEY")  # noqa: F405
  23
  [end of csunplugged/config/settings/database_proxy.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/csunplugged/config/settings/database_proxy.py b/csunplugged/config/settings/database_proxy.py
  --- a/csunplugged/config/settings/database_proxy.py
  +++ b/csunplugged/config/settings/database_proxy.py
  @@ -10,8 +10,8 @@
   DATABASES = {
       "default": {
           "ENGINE": "django.db.backends.postgresql",
  -        "HOST": "localhost",
  -        "PORT": "5433",
  +        "HOST": "cloud_sql_proxy",
  +        "PORT": "5432",
           "NAME": "csunplugged",
           "USER": env("GOOGLE_CLOUD_SQL_DATABASE_USERNAME"),  # noqa: F405
           "PASSWORD": env("GOOGLE_CLOUD_SQL_DATABASE_PASSWORD"),  # noqa: F405
  
verification_info: {"golden_diff": "diff --git a/csunplugged/config/settings/database_proxy.py b/csunplugged/config/settings/database_proxy.py\n--- a/csunplugged/config/settings/database_proxy.py\n+++ b/csunplugged/config/settings/database_proxy.py\n@@ -10,8 +10,8 @@\n DATABASES = {\n     \"default\": {\n         \"ENGINE\": \"django.db.backends.postgresql\",\n-        \"HOST\": \"localhost\",\n-        \"PORT\": \"5433\",\n+        \"HOST\": \"cloud_sql_proxy\",\n+        \"PORT\": \"5432\",\n         \"NAME\": \"csunplugged\",\n         \"USER\": env(\"GOOGLE_CLOUD_SQL_DATABASE_USERNAME\"),  # noqa: F405\n         \"PASSWORD\": env(\"GOOGLE_CLOUD_SQL_DATABASE_PASSWORD\"),  # noqa: F405\n", "issue": "Modify docker configuration to work on OSX\nDocker for Mac does not properly support the `network_mode: host` option for containers. In order to run the system on OSX, it will be necessary to network the containers using a bridged network:\r\n\r\n> By default Compose sets up a single network for your app. Each container for a service joins the default network and is both reachable by other containers on that network, and discoverable by them at a hostname identical to the container name.\"\r\n\r\nRather than accessing other containers via a port on localhost, containers will  access each other using the instance name as the hostname. Port 80 will then be exposed from the nginx container to the host.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"Django settings for connecting via Google Cloud SQL Proxy.\"\"\"\n\nfrom .base import *  # noqa: F403\n\n\n# DATABASE CONFIGURATION\n# ----------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases\nDATABASES = {\n    \"default\": {\n        \"ENGINE\": \"django.db.backends.postgresql\",\n        \"HOST\": \"localhost\",\n        \"PORT\": \"5433\",\n        \"NAME\": \"csunplugged\",\n        \"USER\": env(\"GOOGLE_CLOUD_SQL_DATABASE_USERNAME\"),  # noqa: F405\n        \"PASSWORD\": env(\"GOOGLE_CLOUD_SQL_DATABASE_PASSWORD\"),  # noqa: F405\n        \"ATOMIC_REQUESTS\": True,\n    }\n}\n\nSECRET_KEY = env(\"DJANGO_SECRET_KEY\")  # noqa: F405\n", "path": "csunplugged/config/settings/database_proxy.py"}]}