def process_request(self, request, *args, **kwargs): if not request.is_secure(): return build_ssl_http_response(request) return None
def _view(request, *args, **kwargs): if not request.is_secure(): return build_ssl_http_response(request, url=redirect_to) return view_func(request, *args, **kwargs)