mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-16 16:57:12 +08:00
initial commit
This commit is contained in:
19
django/contrib/admindocs/middleware.pyi
Normal file
19
django/contrib/admindocs/middleware.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from django.http.response import HttpResponse
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
Optional,
|
||||
Tuple,
|
||||
)
|
||||
|
||||
|
||||
class XViewMiddleware:
|
||||
def process_view(
|
||||
self,
|
||||
request: WSGIRequest,
|
||||
view_func: Callable,
|
||||
view_args: Tuple,
|
||||
view_kwargs: Dict[Any, Any]
|
||||
) -> Optional[HttpResponse]: ...
|
||||
10
django/contrib/admindocs/utils.pyi
Normal file
10
django/contrib/admindocs/utils.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Callable
|
||||
|
||||
|
||||
def get_view_name(view_func: Callable) -> str: ...
|
||||
|
||||
|
||||
def replace_named_groups(pattern: str) -> str: ...
|
||||
|
||||
|
||||
def replace_unnamed_groups(pattern: str) -> str: ...
|
||||
4
django/contrib/admindocs/views.pyi
Normal file
4
django/contrib/admindocs/views.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from django.db.models.fields import Field
|
||||
|
||||
|
||||
def get_readable_field_data_type(field: Field) -> str: ...
|
||||
Reference in New Issue
Block a user