File: decorators.pyi

package info (click to toggle)
python-django-stubs 5.2.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,832 kB
  • sloc: python: 5,185; makefile: 15; sh: 8
file content (15 lines) | stat: -rw-r--r-- 461 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from collections.abc import Callable
from typing import TypeVar, overload

from django.utils.functional import _StrOrPromise

_C = TypeVar("_C", bound=Callable)

@overload
def staff_member_required(
    view_func: _C = ..., redirect_field_name: str | None = ..., login_url: _StrOrPromise = ...
) -> _C: ...
@overload
def staff_member_required(
    view_func: None = None, redirect_field_name: str | None = ..., login_url: _StrOrPromise = ...
) -> Callable: ...