def adminlogin(request): if request.user.is_authenticated(): return site.index(request) users = User.objects.all() return login(request, template_name='tinylogin.html', extra_context={'users': users})
def get(self, request): html = admin_site.index(request) return JsonResponse(self._sanitize_response(request, html.context_data))