mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-22 03:41:28 +08:00
better stubs
This commit is contained in:
@@ -1,19 +1,9 @@
|
||||
# Stubs for django.views.defaults (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
from typing import Any, Optional
|
||||
|
||||
from typing import Any
|
||||
|
||||
from django.core.exceptions import PermissionDenied, SuspiciousOperation
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from django.http.response import (
|
||||
Http404,
|
||||
HttpResponseBadRequest,
|
||||
HttpResponseForbidden,
|
||||
HttpResponseNotFound,
|
||||
HttpResponseServerError,
|
||||
)
|
||||
from typing import Optional
|
||||
from django.http.response import (Http404, HttpResponseBadRequest,
|
||||
HttpResponseForbidden, HttpResponseNotFound,
|
||||
HttpResponseServerError)
|
||||
|
||||
ERROR_404_TEMPLATE_NAME: str
|
||||
ERROR_403_TEMPLATE_NAME: str
|
||||
@@ -27,8 +17,8 @@ def server_error(
|
||||
request: WSGIRequest, template_name: str = ...
|
||||
) -> HttpResponseServerError: ...
|
||||
def bad_request(
|
||||
request: WSGIRequest, exception: SuspiciousOperation, template_name: str = ...
|
||||
request: WSGIRequest, exception: Exception, template_name: str = ...
|
||||
) -> HttpResponseBadRequest: ...
|
||||
def permission_denied(
|
||||
request: WSGIRequest, exception: PermissionDenied, template_name: str = ...
|
||||
request: WSGIRequest, exception: Exception, template_name: str = ...
|
||||
) -> HttpResponseForbidden: ...
|
||||
|
||||
Reference in New Issue
Block a user