mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-02-05 01:17:40 +08:00
27 lines
658 B
Python
27 lines
658 B
Python
from django.contrib.auth.models import (
|
|
AnonymousUser,
|
|
User,
|
|
)
|
|
from django.http.request import HttpRequest
|
|
from typing import (
|
|
Dict,
|
|
Union,
|
|
)
|
|
|
|
|
|
def auth(
|
|
request: HttpRequest
|
|
) -> Dict[str, Union[PermWrapper, AnonymousUser, User]]: ...
|
|
|
|
|
|
class PermLookupDict:
|
|
def __bool__(self) -> bool: ...
|
|
def __getitem__(self, perm_name: str) -> bool: ...
|
|
def __init__(self, user: object, app_label: str) -> None: ...
|
|
|
|
|
|
class PermWrapper:
|
|
def __contains__(self, perm_name: str) -> bool: ...
|
|
def __getitem__(self, app_label: str) -> PermLookupDict: ...
|
|
def __init__(self, user: object) -> None: ...
|
|
def __iter__(self): ... |