def admin_view(self, view, cacheable=False):
        def inner(request, *args, **kwargs):
            if not self.has_permission(request):
                return self.login(request)
            return view(request, *args, **kwargs)
        if not cacheable:
            inner = never_cache(inner)
        # We add csrf_protect here so this function can be used as a utility
        # function for any view, without having to repeat 'csrf_protect'.
        if not getattr(view, 'csrf_exempt', False):
            inner = csrf_protect(inner)
        return update_wrapper(inner, view)
Decorator to create an admin view attached to this ``AdminSite``. This
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.3/django/contrib/admin/sites.py/AdminSite.admin_view