Added the user details in the Mia core application.

This commit is contained in:
2020-08-09 20:47:53 +08:00
parent 229ce011b5
commit c500f15945
4 changed files with 296 additions and 15 deletions

View File

@ -24,7 +24,8 @@ from django.contrib.messages.views import SuccessMessageMixin
from django.http import HttpResponse
from django.shortcuts import redirect
from django.views.decorators.http import require_POST
from django.views.generic import DeleteView as CoreDeleteView, ListView
from django.views.generic import DeleteView as CoreDeleteView, ListView, \
DetailView
from mia_core.models import User
@ -60,6 +61,12 @@ class UserListView(ListView):
queryset = User.objects.order_by("login_id")
class UserView(DetailView):
"""The view of a user."""
def get_object(self, queryset=None):
return self.request.resolver_match.kwargs["user"]
# TODO: To be removed.
def todo(request, **kwargs):
"""A dummy placeholder view for the URL settings that are not