mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 12:14:28 +08:00
Allow error handlers to be strings (#307)
Based on the docs on this page: https://docs.djangoproject.com/en/3.0/ref/urls/
This commit is contained in:
committed by
Nikita Sobolev
parent
bfae51e64c
commit
836d5acd8f
@@ -5,10 +5,10 @@ from django.http.response import HttpResponse, HttpResponseBase
|
|||||||
|
|
||||||
from django.urls import URLResolver, URLPattern
|
from django.urls import URLResolver, URLPattern
|
||||||
|
|
||||||
handler400: Callable[..., HttpResponse] = ...
|
handler400: Union[str, Callable[..., HttpResponse]] = ...
|
||||||
handler403: Callable[..., HttpResponse] = ...
|
handler403: Union[str, Callable[..., HttpResponse]] = ...
|
||||||
handler404: Callable[..., HttpResponse] = ...
|
handler404: Union[str, Callable[..., HttpResponse]] = ...
|
||||||
handler500: Callable[..., HttpResponse] = ...
|
handler500: Union[str, Callable[..., HttpResponse]] = ...
|
||||||
|
|
||||||
IncludedURLConf = Tuple[List[URLResolver], Optional[str], Optional[str]]
|
IncludedURLConf = Tuple[List[URLResolver], Optional[str], Optional[str]]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user