mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-17 17:35:59 +08:00
30 lines
688 B
Python
30 lines
688 B
Python
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: ... |