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