prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [Documentation] Docs link is Absolute, not Relative
  The documentation link always goes to `https://uclapi.com/docs`, even if running in, for example, staging. Just linking to `/docs` would be adequate to fix this.
  
  </issue>
  <code>
  [start of backend/uclapi/resources/views.py]
  1 import os
  2 import requests
  3 
  4 from lxml import etree
  5 
  6 from common.decorators import uclapi_protected_endpoint
  7 from common.helpers import PrettyJsonResponse as JsonResponse
  8 
  9 from rest_framework.decorators import api_view
  10 
  11 
  12 @api_view(['GET'])
  13 @uclapi_protected_endpoint()
  14 def get_pc_availability(request, *args, **kwargs):
  15     try:
  16         r = requests.get(os.environ["PCA_LINK"])
  17     except requests.exceptions.MissingSchema:
  18         resp = JsonResponse({
  19             "ok": False,
  20             "error": ("Could not retrieve availability data."
  21                       " Please try again later or contact us for support.")
  22         }, rate_limiting_data=kwargs)
  23         resp.status_code = 400
  24         return resp
  25 
  26     try:
  27         e = etree.fromstring(r.content)
  28     except (ValueError, etree.XMLSyntaxError):
  29         resp = JsonResponse({
  30             "ok": False,
  31             "error": ("Could not parse the desktop availability data."
  32                       " Please try again later or contact us for support.")
  33         }, rate_limiting_data=kwargs)
  34         resp.status_code = 400
  35         return resp
  36 
  37     data = []
  38     for pc in e.findall("room"):
  39         _ = pc.get
  40         data.append({
  41             "location": {
  42                 "room_name": _("location"),
  43                 "room_id": _("rid"),
  44                 "latitude": _("latitude"),
  45                 "longitude": _("longitude"),
  46                 "building_name": _("buildingName"),
  47                 "address": _("buildingAddress"),
  48                 "postcode": _("buildingPostCode")
  49             },
  50             "free_seats": _("free"),
  51             "total_seats": _("seats"),
  52             "room_status": _("info")
  53         })
  54 
  55     return JsonResponse({
  56         "ok": True,
  57         "data": data
  58     }, rate_limiting_data=kwargs)
  59
  [end of backend/uclapi/resources/views.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/backend/uclapi/resources/views.py b/backend/uclapi/resources/views.py
  --- a/backend/uclapi/resources/views.py
  +++ b/backend/uclapi/resources/views.py
  @@ -45,7 +45,7 @@
                   "longitude": _("longitude"),
                   "building_name": _("buildingName"),
                   "address": _("buildingAddress"),
  -                "postcode": _("buildingPostCode")
  +                "postcode": _("buildingPostcode")
               },
               "free_seats": _("free"),
               "total_seats": _("seats"),
  
verification_info: {"golden_diff": "diff --git a/backend/uclapi/resources/views.py b/backend/uclapi/resources/views.py\n--- a/backend/uclapi/resources/views.py\n+++ b/backend/uclapi/resources/views.py\n@@ -45,7 +45,7 @@\n                 \"longitude\": _(\"longitude\"),\n                 \"building_name\": _(\"buildingName\"),\n                 \"address\": _(\"buildingAddress\"),\n-                \"postcode\": _(\"buildingPostCode\")\n+                \"postcode\": _(\"buildingPostcode\")\n             },\n             \"free_seats\": _(\"free\"),\n             \"total_seats\": _(\"seats\"),\n", "issue": "[Documentation] Docs link is Absolute, not Relative\nThe documentation link always goes to `https://uclapi.com/docs`, even if running in, for example, staging. Just linking to `/docs` would be adequate to fix this.\n", "before_files": [{"content": "import os\nimport requests\n\nfrom lxml import etree\n\nfrom common.decorators import uclapi_protected_endpoint\nfrom common.helpers import PrettyJsonResponse as JsonResponse\n\nfrom rest_framework.decorators import api_view\n\n\n@api_view(['GET'])\n@uclapi_protected_endpoint()\ndef get_pc_availability(request, *args, **kwargs):\n    try:\n        r = requests.get(os.environ[\"PCA_LINK\"])\n    except requests.exceptions.MissingSchema:\n        resp = JsonResponse({\n            \"ok\": False,\n            \"error\": (\"Could not retrieve availability data.\"\n                      \" Please try again later or contact us for support.\")\n        }, rate_limiting_data=kwargs)\n        resp.status_code = 400\n        return resp\n\n    try:\n        e = etree.fromstring(r.content)\n    except (ValueError, etree.XMLSyntaxError):\n        resp = JsonResponse({\n            \"ok\": False,\n            \"error\": (\"Could not parse the desktop availability data.\"\n                      \" Please try again later or contact us for support.\")\n        }, rate_limiting_data=kwargs)\n        resp.status_code = 400\n        return resp\n\n    data = []\n    for pc in e.findall(\"room\"):\n        _ = pc.get\n        data.append({\n            \"location\": {\n                \"room_name\": _(\"location\"),\n                \"room_id\": _(\"rid\"),\n                \"latitude\": _(\"latitude\"),\n                \"longitude\": _(\"longitude\"),\n                \"building_name\": _(\"buildingName\"),\n                \"address\": _(\"buildingAddress\"),\n                \"postcode\": _(\"buildingPostCode\")\n            },\n            \"free_seats\": _(\"free\"),\n            \"total_seats\": _(\"seats\"),\n            \"room_status\": _(\"info\")\n        })\n\n    return JsonResponse({\n        \"ok\": True,\n        \"data\": data\n    }, rate_limiting_data=kwargs)\n", "path": "backend/uclapi/resources/views.py"}]}