oacpl/main/views.py

15 lines
342 B
Python
Raw Normal View History

2017-08-18 23:37:16 -04:00
from django.shortcuts import render, redirect
from django.contrib import auth
2017-08-17 13:20:57 -04:00
from charter_members.models import Attorney
def index(request):
attorneys = Attorney.objects.filter(front_page=True)
return render(request, 'index.html', {'attorneys': attorneys})
2017-08-18 23:37:16 -04:00
def logout(request):
auth.logout(request)
return redirect('/')