mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 04:54:48 +08:00
27 lines
491 B
Python
27 lines
491 B
Python
from typing import (
|
|
Callable,
|
|
List,
|
|
Optional,
|
|
Union,
|
|
)
|
|
|
|
|
|
def login_required(
|
|
function: Optional[Callable] = ...,
|
|
redirect_field_name: str = ...,
|
|
login_url: None = ...
|
|
) -> Callable: ...
|
|
|
|
|
|
def permission_required(
|
|
perm: Union[str, List[str]],
|
|
login_url: None = ...,
|
|
raise_exception: bool = ...
|
|
) -> Callable: ...
|
|
|
|
|
|
def user_passes_test(
|
|
test_func: Callable,
|
|
login_url: Optional[str] = ...,
|
|
redirect_field_name: str = ...
|
|
) -> Callable: ... |