prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Use Django Extensions, deprecate and remove ptvsd
  [Django Extensions](https://django-extensions.readthedocs.io/en/latest/) are a really useful set of management and development tools. One of the most useful ones (I find) is `runserver_plus`, which you can run instead of the normal `runserver` when developing. This gives you access to an in-browser debugger tool, replacing the standard Django error  pages with an interactive traceback and debugger.
  
  Another useful one is `shell_plus` which can pre-load all of your models into an interactive Python shell. If you also have iPython installed it will use that, making the Python repl much easier to use.
  
  With a move to these tools, I think [the modifications](https://github.com/DDMAL/CantusDB/blob/develop/django/cantusdb_project/manage.py#L9-L18) to `manage.py` can be un-done, and the dependency on the ptvsd module can be removed. This module anyway [seems to be deprecated](https://github.com/microsoft/ptvsd). 
  
  </issue>
  <code>
  [start of django/cantusdb_project/manage.py]
  1 #!/usr/bin/env python
  2 """Django's command-line utility for administrative tasks."""
  3 import os
  4 import sys
  5 
  6 
  7 def main():
  8     os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cantusdb.settings")
  9     # start new section
  10     from django.conf import settings
  11 
  12     if settings.DEBUG:
  13         if os.environ.get("RUN_MAIN") or os.environ.get("WERKZEUG_RUN_MAIN"):
  14             import ptvsd
  15 
  16             ptvsd.enable_attach(address=("0.0.0.0", 3000))
  17             print("Attached!")
  18     # end new section
  19 
  20     try:
  21         from django.core.management import execute_from_command_line
  22     except ImportError as exc:
  23         raise ImportError(
  24             "Couldn't import Django. Are you sure it's installed and "
  25             "available on your PYTHONPATH environment variable? Did you "
  26             "forget to activate a virtual environment?"
  27         ) from exc
  28     execute_from_command_line(sys.argv)
  29 
  30 
  31 if __name__ == "__main__":
  32     main()
  33
  [end of django/cantusdb_project/manage.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/django/cantusdb_project/manage.py b/django/cantusdb_project/manage.py
  --- a/django/cantusdb_project/manage.py
  +++ b/django/cantusdb_project/manage.py
  @@ -6,17 +6,6 @@
   
   def main():
       os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cantusdb.settings")
  -    # start new section
  -    from django.conf import settings
  -
  -    if settings.DEBUG:
  -        if os.environ.get("RUN_MAIN") or os.environ.get("WERKZEUG_RUN_MAIN"):
  -            import ptvsd
  -
  -            ptvsd.enable_attach(address=("0.0.0.0", 3000))
  -            print("Attached!")
  -    # end new section
  -
       try:
           from django.core.management import execute_from_command_line
       except ImportError as exc:
  
verification_info: {"golden_diff": "diff --git a/django/cantusdb_project/manage.py b/django/cantusdb_project/manage.py\n--- a/django/cantusdb_project/manage.py\n+++ b/django/cantusdb_project/manage.py\n@@ -6,17 +6,6 @@\n \n def main():\n     os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"cantusdb.settings\")\n-    # start new section\n-    from django.conf import settings\n-\n-    if settings.DEBUG:\n-        if os.environ.get(\"RUN_MAIN\") or os.environ.get(\"WERKZEUG_RUN_MAIN\"):\n-            import ptvsd\n-\n-            ptvsd.enable_attach(address=(\"0.0.0.0\", 3000))\n-            print(\"Attached!\")\n-    # end new section\n-\n     try:\n         from django.core.management import execute_from_command_line\n     except ImportError as exc:\n", "issue": "Use Django Extensions, deprecate and remove ptvsd\n[Django Extensions](https://django-extensions.readthedocs.io/en/latest/) are a really useful set of management and development tools. One of the most useful ones (I find) is `runserver_plus`, which you can run instead of the normal `runserver` when developing. This gives you access to an in-browser debugger tool, replacing the standard Django error  pages with an interactive traceback and debugger.\r\n\r\nAnother useful one is `shell_plus` which can pre-load all of your models into an interactive Python shell. If you also have iPython installed it will use that, making the Python repl much easier to use.\r\n\r\nWith a move to these tools, I think [the modifications](https://github.com/DDMAL/CantusDB/blob/develop/django/cantusdb_project/manage.py#L9-L18) to `manage.py` can be un-done, and the dependency on the ptvsd module can be removed. This module anyway [seems to be deprecated](https://github.com/microsoft/ptvsd). \n", "before_files": [{"content": "#!/usr/bin/env python\n\"\"\"Django's command-line utility for administrative tasks.\"\"\"\nimport os\nimport sys\n\n\ndef main():\n    os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"cantusdb.settings\")\n    # start new section\n    from django.conf import settings\n\n    if settings.DEBUG:\n        if os.environ.get(\"RUN_MAIN\") or os.environ.get(\"WERKZEUG_RUN_MAIN\"):\n            import ptvsd\n\n            ptvsd.enable_attach(address=(\"0.0.0.0\", 3000))\n            print(\"Attached!\")\n    # end new section\n\n    try:\n        from django.core.management import execute_from_command_line\n    except ImportError as exc:\n        raise ImportError(\n            \"Couldn't import Django. Are you sure it's installed and \"\n            \"available on your PYTHONPATH environment variable? Did you \"\n            \"forget to activate a virtual environment?\"\n        ) from exc\n    execute_from_command_line(sys.argv)\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "django/cantusdb_project/manage.py"}]}