def admin_view(self, view, cacheable=False):
        def inner(request, *args, **kwargs):
            if not self.has_permission(request) and getattr(view, 'need_site_permission', True):
                return self.create_admin_view(self.login_view)(request, *args, **kwargs)
            return view(request, *args, **kwargs)
        if not cacheable:
            inner = never_cache(inner)
        return update_wrapper(inner, view)
Decorator to create an admin view attached to this ``AdminSite``. This
dataset/ETHPy150Open sshwsfc/xadmin/xadmin/sites.py/AdminSite.admin_view