예제 #1
0
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})
예제 #2
0
 def get(self, request):
     html = admin_site.index(request)
     return JsonResponse(self._sanitize_response(request, html.context_data))