title: Django redirect after logout
body: <p>I'm using Django and to authenticate my user, I have a custom OAuth2 provider. I had to write the login and logout view myself because they are doing some very specific things.</p>
  
  <p>I would like to be redirected to the same url after logout. If you are on a page that require to be authenticated, I would like to redirect to the homepage. I didn't find any resource to know if a view/endpoint is using the decorator <code>login_required</code> </p>