prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  panel/examples/apps/django2/ example doesn't work
  The django2 example doesn't work at least for Django 2.2. The interactive plot doesn't show up and there are no clear error messages either. However, the same example provided by ParamBokeh works fine. But I prefer Panel if this problem can be solved. 
  
  </issue>
  <code>
  [start of examples/apps/django2/sliders/bk_sliders.py]
  1 import panel as pn
  2 
  3 from .sinewave import SineWave
  4 
  5 def app(doc):
  6     sw = SineWave()
  7     row = pn.Row(sw.param, sw.plot)
  8     row._get_root(doc)
  9
  [end of examples/apps/django2/sliders/bk_sliders.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/examples/apps/django2/sliders/bk_sliders.py b/examples/apps/django2/sliders/bk_sliders.py
  --- a/examples/apps/django2/sliders/bk_sliders.py
  +++ b/examples/apps/django2/sliders/bk_sliders.py
  @@ -5,4 +5,4 @@
   def app(doc):
       sw = SineWave()
       row = pn.Row(sw.param, sw.plot)
  -    row._get_root(doc)
  +    row.server_doc(doc)
  
verification_info: {"golden_diff": "diff --git a/examples/apps/django2/sliders/bk_sliders.py b/examples/apps/django2/sliders/bk_sliders.py\n--- a/examples/apps/django2/sliders/bk_sliders.py\n+++ b/examples/apps/django2/sliders/bk_sliders.py\n@@ -5,4 +5,4 @@\n def app(doc):\n     sw = SineWave()\n     row = pn.Row(sw.param, sw.plot)\n-    row._get_root(doc)\n+    row.server_doc(doc)\n", "issue": "panel/examples/apps/django2/ example doesn't work\nThe django2 example doesn't work at least for Django 2.2. The interactive plot doesn't show up and there are no clear error messages either. However, the same example provided by ParamBokeh works fine. But I prefer Panel if this problem can be solved. \n", "before_files": [{"content": "import panel as pn\n\nfrom .sinewave import SineWave\n\ndef app(doc):\n    sw = SineWave()\n    row = pn.Row(sw.param, sw.plot)\n    row._get_root(doc)\n", "path": "examples/apps/django2/sliders/bk_sliders.py"}]}