Two small improvements (#217)

* Add return type for admin.SimpleListFilter.lookups

* force_login() can take any user, not just builtin
This commit is contained in:
Anna Sidwell
2019-11-12 11:31:24 +01:00
committed by Nikita Sobolev
parent 14aea2b4d4
commit 3a9263dc62
2 changed files with 3 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ class SimpleListFilter(ListFilter):
parameter_name: Any = ...
lookup_choices: Any = ...
def value(self) -> Optional[str]: ...
def lookups(self, request: Any, model_admin: Any) -> None: ...
def lookups(self, request: Any, model_admin: Any) -> List[Tuple[Any, str]]: ...
class FieldListFilter(ListFilter):
field: Field = ...