from django.urls import path, re_path
from django.conf.urls.static import static
from django.conf import settings

from . import views


urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [
    path('go/<path:path>', views.redirector, name='redirector'),
    re_path('^', views.index, name='index'),
]

from django.conf import settings
from django.conf.urls.static import static
from django.contrib.auth.views import logout
from django.urls import path, re_path

from . import views


urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [
    path('go/<path:path>', views.redirector, name='redirector'),
    path('logout', logout, {'next_page': '/'}),
    re_path('^', views.index, name='index'),
]

Handle logout on the backend
Handle logout on the backend

+ from django.conf import settings
+ from django.conf.urls.static import static
+ from django.contrib.auth.views import logout
  from django.urls import path, re_path
- from django.conf.urls.static import static
- from django.conf import settings
  
  from . import views
  
  
  urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [
      path('go/<path:path>', views.redirector, name='redirector'),
+     path('logout', logout, {'next_page': '/'}),
      re_path('^', views.index, name='index'),
  ]
  
Handle logout on the backend
## Code Before:
from django.urls import path, re_path
from django.conf.urls.static import static
from django.conf import settings

from . import views


urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [
    path('go/<path:path>', views.redirector, name='redirector'),
    re_path('^', views.index, name='index'),
]

## Instruction:
Handle logout on the backend
## Code After:
from django.conf import settings
from django.conf.urls.static import static
from django.contrib.auth.views import logout
from django.urls import path, re_path

from . import views


urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [
    path('go/<path:path>', views.redirector, name='redirector'),
    path('logout', logout, {'next_page': '/'}),
    re_path('^', views.index, name='index'),
]
