prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN 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). 
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `django/cantusdb_project/manage.py`
  Content:
  ```
  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 FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
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"}], "after_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    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"}]}