Skip to content

Commit

Permalink
Add HttpResponsePermanentRedirect to django.shortcuts (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
SRChiP authored and mkurnikov committed Nov 12, 2019
1 parent 3a9263d commit d061e84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions django-stubs/shortcuts.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
from typing import Any, Callable, Dict, List, Optional, Protocol, Sequence, Type, TypeVar, Union

from django.db.models.base import Model
from django.http.response import HttpResponse as HttpResponse, HttpResponseRedirect as HttpResponseRedirect
from django.http.response import (
HttpResponse as HttpResponse,
HttpResponseRedirect as HttpResponseRedirect,
HttpResponsePermanentRedirect as HttpResponsePermanentRedirect,
)

from django.db.models import Manager, QuerySet
from django.http import HttpRequest
Expand All @@ -26,7 +30,7 @@ class SupportsGetAbsoluteUrl(Protocol): ...

def redirect(
to: Union[Callable, str, SupportsGetAbsoluteUrl], *args: Any, permanent: bool = ..., **kwargs: Any
) -> HttpResponseRedirect: ...
) -> Union[HttpResponseRedirect, HttpResponsePermanentRedirect]: ...

_T = TypeVar("_T", bound=Model)

Expand Down

0 comments on commit d061e84

Please sign in to comment.