mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-18 01:45:59 +08:00
initial commit
This commit is contained in:
30
django/contrib/auth/mixins.pyi
Normal file
30
django/contrib/auth/mixins.pyi
Normal file
@@ -0,0 +1,30 @@
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from django.http.response import HttpResponse
|
||||
from typing import (
|
||||
Callable,
|
||||
List,
|
||||
)
|
||||
|
||||
|
||||
class AccessMixin:
|
||||
def get_permission_denied_message(self) -> str: ...
|
||||
def get_redirect_field_name(self) -> str: ...
|
||||
def handle_no_permission(self): ...
|
||||
|
||||
|
||||
class LoginRequiredMixin:
|
||||
def dispatch(self, request: WSGIRequest, *args, **kwargs): ...
|
||||
|
||||
|
||||
class PermissionRequiredMixin:
|
||||
def dispatch(
|
||||
self,
|
||||
request: WSGIRequest,
|
||||
*args,
|
||||
**kwargs
|
||||
) -> HttpResponse: ...
|
||||
def get_permission_required(self) -> List[str]: ...
|
||||
|
||||
|
||||
class UserPassesTestMixin:
|
||||
def get_test_func(self) -> Callable: ...
|
||||
Reference in New Issue
Block a user