From 41f283552a2fb0474ad9e5cbb1eaa635eaa0e53a Mon Sep 17 00:00:00 2001 From: Rune Steinnes Date: Tue, 19 Feb 2019 11:16:27 +0100 Subject: [PATCH] Replaced WSGIRequest with http.HttpRequest in mixin:LoginRequiredMixin --- django-stubs/contrib/auth/mixins.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/django-stubs/contrib/auth/mixins.pyi b/django-stubs/contrib/auth/mixins.pyi index 88acc2c..6fdc67b 100644 --- a/django-stubs/contrib/auth/mixins.pyi +++ b/django-stubs/contrib/auth/mixins.pyi @@ -1,6 +1,6 @@ from typing import Any, Callable, List, Optional -from django.core.handlers.wsgi import WSGIRequest +from django import http from django.http.response import HttpResponse, HttpResponseRedirect class AccessMixin: @@ -14,15 +14,15 @@ class AccessMixin: def handle_no_permission(self) -> HttpResponseRedirect: ... class LoginRequiredMixin(AccessMixin): - def dispatch(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ... + def dispatch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ... class PermissionRequiredMixin(AccessMixin): permission_required: Any = ... def get_permission_required(self) -> List[str]: ... def has_permission(self) -> bool: ... - def dispatch(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ... + def dispatch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ... class UserPassesTestMixin(AccessMixin): def test_func(self) -> None: ... def get_test_func(self) -> Callable: ... - def dispatch(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> HttpResponse: ... + def dispatch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...