symposion_app/symposion/conference/views.py
Sachi King d5986de870 Use django's login_required decorator
This only seems to be here to have some custom login_url used bypassing
django's model.  Well as we want to use django's model, this just won't
do.  So lets move to using django's model.
2017-03-26 12:32:32 +11:00

16 lines
385 B
Python

from django.http import Http404
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
@login_required
def user_list(request):
if not request.user.is_staff:
raise Http404()
return render(request, "symposion/conference/user_list.html", {
"users": User.objects.all(),
})