From bc75416e84eb476759fdd5f2cca06fa99df27a6e Mon Sep 17 00:00:00 2001 From: Serhii Tereshchenko Date: Tue, 26 Dec 2023 14:53:47 +0200 Subject: [PATCH] fix: Add `get_inlines` method to BaseModelAdmin --- django-stubs/contrib/admin/options.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django-stubs/contrib/admin/options.pyi b/django-stubs/contrib/admin/options.pyi index 9832bf101c..9213b28810 100644 --- a/django-stubs/contrib/admin/options.pyi +++ b/django-stubs/contrib/admin/options.pyi @@ -126,6 +126,9 @@ class BaseModelAdmin(Generic[_ModelT]): def get_sortable_by( self, request: HttpRequest ) -> list[Callable[..., Any]] | list[str] | tuple[Any, ...]: ... + def get_inlines( + self, request: HttpRequest, obj: _ModelT | None + ) -> list[type[InlineModelAdmin[Any]]]: ... def lookup_allowed(self, lookup: str, value: str) -> bool: ... def to_field_allowed(self, request: HttpRequest, to_field: str) -> bool: ... def has_add_permission(self, request: HttpRequest) -> bool: ...