Added logout
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
from django.shortcuts import render
|
||||
from django.shortcuts import render, redirect
|
||||
from django.contrib import auth
|
||||
|
||||
from charter_members.models import Attorney
|
||||
|
||||
@ -6,3 +7,8 @@ from charter_members.models import Attorney
|
||||
def index(request):
|
||||
attorneys = Attorney.objects.filter(front_page=True)
|
||||
return render(request, 'index.html', {'attorneys': attorneys})
|
||||
|
||||
|
||||
def logout(request):
|
||||
auth.logout(request)
|
||||
return redirect('/')
|
||||
|
Reference in New Issue
Block a user