symposion_app/vendor/symposion/conference/views.py

19 lines
413 B
Python
Raw Normal View History

from django.http import Http404
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.contrib.auth import get_user_model
User = get_user_model()
@login_required
def user_list(request):
2014-07-30 18:19:26 +00:00
if not request.user.is_staff:
raise Http404()
2014-07-30 18:19:26 +00:00
return render(request, "symposion/conference/user_list.html", {
"users": User.objects.all(),
})