symposion_app/vendor/symposion/conference/views.py
Joel Addison 252697b842 Update to Django 2.2
Upgrade site and modules to Django 2.2. Remove and replace obsolete
functionality with current equivalents. Update requirements to latest
versions where possible. Remove unused dependencies.
2020-11-22 23:58:14 +10:00

18 lines
413 B
Python

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):
if not request.user.is_staff:
raise Http404()
return render(request, "symposion/conference/user_list.html", {
"users": User.objects.all(),
})