title: How to implement logout in django in template?
body: <p>This is my views.py</p>
  
  <pre><code>from django.shortcuts import render
  from django.views.decorators.csrf import csrf_exempt
  import os
  
  # Create your views here.
  @csrf_exempt
  def index(request):
      if('loggedIn' in request.session):
          id = request.session['uid'];
          return render(request,"index.html",{'uid':id});
      else:
          return render(request,"index.html",{});
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>from django.conf.urls import url
  
  from . import views
  
  urlpatterns = [
      url(r'^$', views.index) ]
  </code></pre>
  
  <p>This is the first time I am doing a Django project. I was able to log in and now see the index page. Now I have a logout button as  Logout</p>
  
  <p>So, what can I need to do to log out from the system.. Please I am not getting idea behind the same.. It will be great If, somebody helped me.</p>