Added the user list in the Mia core application.

This commit is contained in:
2020-08-09 20:22:37 +08:00
parent 062e3f5c93
commit 2a6d3ff4cb
6 changed files with 195 additions and 33 deletions

View File

@ -23,9 +23,10 @@ from django.contrib.auth import logout as logout_user
from django.contrib.messages.views import SuccessMessageMixin
from django.http import HttpResponse
from django.shortcuts import redirect
from django.urls import reverse
from django.views.decorators.http import require_POST
from django.views.generic import DeleteView as CoreDeleteView
from django.views.generic import DeleteView as CoreDeleteView, ListView
from mia_core.models import User
class DeleteView(SuccessMessageMixin, CoreDeleteView):
@ -54,6 +55,11 @@ def logout(request):
return redirect("home")
class UserListView(ListView):
"""The view to list the users."""
queryset = User.objects.order_by("login_id")
# TODO: To be removed.
def todo(request, **kwargs):
"""A dummy placeholder view for the URL settings that are not