Added the user list in the Mia core application.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user