prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Social Auth Provider requires URLS
  According to the [python-social-auth documentation](https://python-social-auth.readthedocs.io/en/latest/configuration/django.html#urls-entries), the url patterns have to be extended to support social auth properly.
  
  ```python
  urlpatterns = patterns('',
      ...
      url('', include('social_django.urls', namespace='social'))
      ...
  )
  ```
  
  Hence the `urls.py` of the nitrate should be extended like this:
  
  ```python
  if "SOCIAL" in settings.ENABLED_AUTH_BACKENDS:
      urlpatterns += [ path("", include('social_django.urls', namespace='social')) ]
  ```
  
  Otherwise, the namespace social cannot be resolved when compiling the login page (refer to [this](https://github.com/Nitrate/Nitrate/blob/b89b37309f00469428e0372166d8c4c804bd9d0d/src/templates/registration/login.html#L53) for details).
  
  Would you accept a pull request?
  Social Auth Provider requires URLS
  According to the [python-social-auth documentation](https://python-social-auth.readthedocs.io/en/latest/configuration/django.html#urls-entries), the url patterns have to be extended to support social auth properly.
  
  ```python
  urlpatterns = patterns('',
      ...
      url('', include('social_django.urls', namespace='social'))
      ...
  )
  ```
  
  Hence the `urls.py` of the nitrate should be extended like this:
  
  ```python
  if "SOCIAL" in settings.ENABLED_AUTH_BACKENDS:
      urlpatterns += [ path("", include('social_django.urls', namespace='social')) ]
  ```
  
  Otherwise, the namespace social cannot be resolved when compiling the login page (refer to [this](https://github.com/Nitrate/Nitrate/blob/b89b37309f00469428e0372166d8c4c804bd9d0d/src/templates/registration/login.html#L53) for details).
  
  Would you accept a pull request?
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `src/tcms/urls.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 
  3 from django.conf import settings
  4 from django.contrib import admin
  5 from django.urls import include, path
  6 from django.views.i18n import JavaScriptCatalog
  7 
  8 # XML RPC handler
  9 from kobo.django.xmlrpc.views import XMLRPCHandlerFactory
  10 
  11 from tcms.core import ajax as tcms_core_ajax
  12 from tcms.testruns import views as testruns_views
  13 
  14 xmlrpc_handler = XMLRPCHandlerFactory("TCMS_XML_RPC")
  15 
  16 urlpatterns = [
  17     path("admin/", admin.site.urls),
  18     path("admin/doc/", include("django.contrib.admindocs.urls")),
  19     path("", include("tcms.core.urls")),
  20     path("", include("tcms.management.urls")),
  21     # Testplans zone
  22     path("plan/", include("tcms.testplans.urls.plan_urls")),
  23     path("plans/", include("tcms.testplans.urls.plans_urls")),
  24     # Testcases zone
  25     path("case/", include("tcms.testcases.urls.case_urls")),
  26     path("cases/", include("tcms.testcases.urls.cases_urls")),
  27     # Testruns zone
  28     path("run/", include("tcms.testruns.urls.run_urls")),
  29     path("runs/", include("tcms.testruns.urls.runs_urls")),
  30     path("accounts/", include("tcms.profiles.urls")),
  31     path("linkref/", include("tcms.linkreference.urls")),
  32     path("comments/", include("tcms.comments.urls")),
  33     path("advance-search/", include("tcms.search.urls")),
  34     path("report/", include("tcms.report.urls")),
  35     path("xmlrpc/", xmlrpc_handler),
  36     path("tinymce/", include("tinymce.urls")),
  37     # Using admin js without admin permission
  38     # refer: https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#module-django.views.i18n
  39     path("jsi18n/", JavaScriptCatalog.as_view(), name="javascript-catalog"),
  40 ]
  41 
  42 # Debug zone
  43 
  44 if settings.DEBUG:
  45     import debug_toolbar
  46 
  47     urlpatterns += [
  48         path("__debug__/", include(debug_toolbar.urls)),
  49     ]
  50 
  51 # Overwrite default 500 handler
  52 # More details could see django.core.urlresolvers._resolve_special()
  53 handler500 = "tcms.core.views.error.server_error"
  54
  ```
  --- 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/src/tcms/urls.py b/src/tcms/urls.py
  --- a/src/tcms/urls.py
  +++ b/src/tcms/urls.py
  @@ -39,6 +39,10 @@
       path("jsi18n/", JavaScriptCatalog.as_view(), name="javascript-catalog"),
   ]
   
  +# Python Social Core / Django Social Auth
  +if "SOCIAL" in settings.ENABLED_AUTH_BACKENDS:
  +    urlpatterns += [path("", include("social_django.urls", namespace="social"))]
  +
   # Debug zone
   
   if settings.DEBUG:
  
verification_info: {"golden_diff": "diff --git a/src/tcms/urls.py b/src/tcms/urls.py\n--- a/src/tcms/urls.py\n+++ b/src/tcms/urls.py\n@@ -39,6 +39,10 @@\n     path(\"jsi18n/\", JavaScriptCatalog.as_view(), name=\"javascript-catalog\"),\n ]\n \n+# Python Social Core / Django Social Auth\n+if \"SOCIAL\" in settings.ENABLED_AUTH_BACKENDS:\n+    urlpatterns += [path(\"\", include(\"social_django.urls\", namespace=\"social\"))]\n+\n # Debug zone\n \n if settings.DEBUG:\n", "issue": "Social Auth Provider requires URLS\nAccording to the [python-social-auth documentation](https://python-social-auth.readthedocs.io/en/latest/configuration/django.html#urls-entries), the url patterns have to be extended to support social auth properly.\r\n\r\n```python\r\nurlpatterns = patterns('',\r\n    ...\r\n    url('', include('social_django.urls', namespace='social'))\r\n    ...\r\n)\r\n```\r\n\r\nHence the `urls.py` of the nitrate should be extended like this:\r\n\r\n```python\r\nif \"SOCIAL\" in settings.ENABLED_AUTH_BACKENDS:\r\n    urlpatterns += [ path(\"\", include('social_django.urls', namespace='social')) ]\r\n```\r\n\r\nOtherwise, the namespace social cannot be resolved when compiling the login page (refer to [this](https://github.com/Nitrate/Nitrate/blob/b89b37309f00469428e0372166d8c4c804bd9d0d/src/templates/registration/login.html#L53) for details).\r\n\r\nWould you accept a pull request?\nSocial Auth Provider requires URLS\nAccording to the [python-social-auth documentation](https://python-social-auth.readthedocs.io/en/latest/configuration/django.html#urls-entries), the url patterns have to be extended to support social auth properly.\r\n\r\n```python\r\nurlpatterns = patterns('',\r\n    ...\r\n    url('', include('social_django.urls', namespace='social'))\r\n    ...\r\n)\r\n```\r\n\r\nHence the `urls.py` of the nitrate should be extended like this:\r\n\r\n```python\r\nif \"SOCIAL\" in settings.ENABLED_AUTH_BACKENDS:\r\n    urlpatterns += [ path(\"\", include('social_django.urls', namespace='social')) ]\r\n```\r\n\r\nOtherwise, the namespace social cannot be resolved when compiling the login page (refer to [this](https://github.com/Nitrate/Nitrate/blob/b89b37309f00469428e0372166d8c4c804bd9d0d/src/templates/registration/login.html#L53) for details).\r\n\r\nWould you accept a pull request?\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.urls import include, path\nfrom django.views.i18n import JavaScriptCatalog\n\n# XML RPC handler\nfrom kobo.django.xmlrpc.views import XMLRPCHandlerFactory\n\nfrom tcms.core import ajax as tcms_core_ajax\nfrom tcms.testruns import views as testruns_views\n\nxmlrpc_handler = XMLRPCHandlerFactory(\"TCMS_XML_RPC\")\n\nurlpatterns = [\n    path(\"admin/\", admin.site.urls),\n    path(\"admin/doc/\", include(\"django.contrib.admindocs.urls\")),\n    path(\"\", include(\"tcms.core.urls\")),\n    path(\"\", include(\"tcms.management.urls\")),\n    # Testplans zone\n    path(\"plan/\", include(\"tcms.testplans.urls.plan_urls\")),\n    path(\"plans/\", include(\"tcms.testplans.urls.plans_urls\")),\n    # Testcases zone\n    path(\"case/\", include(\"tcms.testcases.urls.case_urls\")),\n    path(\"cases/\", include(\"tcms.testcases.urls.cases_urls\")),\n    # Testruns zone\n    path(\"run/\", include(\"tcms.testruns.urls.run_urls\")),\n    path(\"runs/\", include(\"tcms.testruns.urls.runs_urls\")),\n    path(\"accounts/\", include(\"tcms.profiles.urls\")),\n    path(\"linkref/\", include(\"tcms.linkreference.urls\")),\n    path(\"comments/\", include(\"tcms.comments.urls\")),\n    path(\"advance-search/\", include(\"tcms.search.urls\")),\n    path(\"report/\", include(\"tcms.report.urls\")),\n    path(\"xmlrpc/\", xmlrpc_handler),\n    path(\"tinymce/\", include(\"tinymce.urls\")),\n    # Using admin js without admin permission\n    # refer: https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#module-django.views.i18n\n    path(\"jsi18n/\", JavaScriptCatalog.as_view(), name=\"javascript-catalog\"),\n]\n\n# Debug zone\n\nif settings.DEBUG:\n    import debug_toolbar\n\n    urlpatterns += [\n        path(\"__debug__/\", include(debug_toolbar.urls)),\n    ]\n\n# Overwrite default 500 handler\n# More details could see django.core.urlresolvers._resolve_special()\nhandler500 = \"tcms.core.views.error.server_error\"\n", "path": "src/tcms/urls.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.urls import include, path\nfrom django.views.i18n import JavaScriptCatalog\n\n# XML RPC handler\nfrom kobo.django.xmlrpc.views import XMLRPCHandlerFactory\n\nfrom tcms.core import ajax as tcms_core_ajax\nfrom tcms.testruns import views as testruns_views\n\nxmlrpc_handler = XMLRPCHandlerFactory(\"TCMS_XML_RPC\")\n\nurlpatterns = [\n    path(\"admin/\", admin.site.urls),\n    path(\"admin/doc/\", include(\"django.contrib.admindocs.urls\")),\n    path(\"\", include(\"tcms.core.urls\")),\n    path(\"\", include(\"tcms.management.urls\")),\n    # Testplans zone\n    path(\"plan/\", include(\"tcms.testplans.urls.plan_urls\")),\n    path(\"plans/\", include(\"tcms.testplans.urls.plans_urls\")),\n    # Testcases zone\n    path(\"case/\", include(\"tcms.testcases.urls.case_urls\")),\n    path(\"cases/\", include(\"tcms.testcases.urls.cases_urls\")),\n    # Testruns zone\n    path(\"run/\", include(\"tcms.testruns.urls.run_urls\")),\n    path(\"runs/\", include(\"tcms.testruns.urls.runs_urls\")),\n    path(\"accounts/\", include(\"tcms.profiles.urls\")),\n    path(\"linkref/\", include(\"tcms.linkreference.urls\")),\n    path(\"comments/\", include(\"tcms.comments.urls\")),\n    path(\"advance-search/\", include(\"tcms.search.urls\")),\n    path(\"report/\", include(\"tcms.report.urls\")),\n    path(\"xmlrpc/\", xmlrpc_handler),\n    path(\"tinymce/\", include(\"tinymce.urls\")),\n    # Using admin js without admin permission\n    # refer: https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#module-django.views.i18n\n    path(\"jsi18n/\", JavaScriptCatalog.as_view(), name=\"javascript-catalog\"),\n]\n\n# Python Social Core / Django Social Auth\nif \"SOCIAL\" in settings.ENABLED_AUTH_BACKENDS:\n    urlpatterns += [path(\"\", include(\"social_django.urls\", namespace=\"social\"))]\n\n# Debug zone\n\nif settings.DEBUG:\n    import debug_toolbar\n\n    urlpatterns += [\n        path(\"__debug__/\", include(debug_toolbar.urls)),\n    ]\n\n# Overwrite default 500 handler\n# More details could see django.core.urlresolvers._resolve_special()\nhandler500 = \"tcms.core.views.error.server_error\"\n", "path": "src/tcms/urls.py"}]}