mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-20 02:41:16 +08:00
Replace models.Model annotations with type variables (#603)
* Replace models.Model annotations with type variables * Adds generic type args to generic views * Adds more tests * Revert "Adds generic type args to generic views" This reverts commit 6522f30cdb9027483f46d77167394c84eb7b7f4b. * Adds Generic support for DetailView and ListView Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
committed by
GitHub
parent
5c3898d3b0
commit
e4de8453cf
@@ -1,6 +1,7 @@
|
||||
from typing import Callable, Optional, TypeVar, overload
|
||||
|
||||
_C = TypeVar("_C", bound=Callable)
|
||||
|
||||
@overload
|
||||
def staff_member_required(
|
||||
view_func: _C = ..., redirect_field_name: Optional[str] = ..., login_url: str = ...
|
||||
|
||||
Reference in New Issue
Block a user