From 836d5acd8f259c28e4b99651277cd18d65185ad0 Mon Sep 17 00:00:00 2001 From: Joseph Kahn Date: Mon, 27 Jan 2020 17:33:49 -0500 Subject: [PATCH] Allow error handlers to be strings (#307) Based on the docs on this page: https://docs.djangoproject.com/en/3.0/ref/urls/ --- django-stubs/conf/urls/__init__.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/django-stubs/conf/urls/__init__.pyi b/django-stubs/conf/urls/__init__.pyi index 6bb0dfa..71d290b 100644 --- a/django-stubs/conf/urls/__init__.pyi +++ b/django-stubs/conf/urls/__init__.pyi @@ -5,10 +5,10 @@ from django.http.response import HttpResponse, HttpResponseBase from django.urls import URLResolver, URLPattern -handler400: Callable[..., HttpResponse] = ... -handler403: Callable[..., HttpResponse] = ... -handler404: Callable[..., HttpResponse] = ... -handler500: Callable[..., HttpResponse] = ... +handler400: Union[str, Callable[..., HttpResponse]] = ... +handler403: Union[str, Callable[..., HttpResponse]] = ... +handler404: Union[str, Callable[..., HttpResponse]] = ... +handler500: Union[str, Callable[..., HttpResponse]] = ... IncludedURLConf = Tuple[List[URLResolver], Optional[str], Optional[str]]