Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2413 -- update ModelAdmin.log_FOO method signatures #2414

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions django-stubs/contrib/admin/options.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ class ModelAdmin(BaseModelAdmin[_ModelT]):
orphans: int = ...,
allow_empty_first_page: bool = ...,
) -> Paginator: ...
def log_addition(self, request: HttpRequest, object: _ModelT, message: Any) -> LogEntry: ...
def log_change(self, request: HttpRequest, object: _ModelT, message: Any) -> LogEntry: ...
def log_deletion(self, request: HttpRequest, object: _ModelT, object_repr: str) -> LogEntry: ...
def log_addition(self, request: HttpRequest, obj: _ModelT, message: Any) -> LogEntry: ...
def log_change(self, request: HttpRequest, obj: _ModelT, message: Any) -> LogEntry: ...
def log_deletion(self, request: HttpRequest, obj: _ModelT, object_repr: str) -> LogEntry: ...
def action_checkbox(self, obj: _ModelT) -> SafeString: ...
def get_actions(self, request: HttpRequest) -> dict[str, tuple[Callable[..., str], str, str] | None]: ...
def get_action_choices(
Expand Down
9 changes: 0 additions & 9 deletions scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ django.conf.global_settings.gettext_noop
django.conf.urls.url
django.contrib.admin.FieldListFilter.title
django.contrib.admin.ModelAdmin
django.contrib.admin.ModelAdmin.log_addition
django.contrib.admin.ModelAdmin.log_change
django.contrib.admin.ModelAdmin.log_deletion
django.contrib.admin.StackedInline
django.contrib.admin.TabularInline
django.contrib.admin.action
Expand Down Expand Up @@ -42,9 +39,6 @@ django.contrib.admin.options.InlineModelAdmin
django.contrib.admin.options.InlineModelAdmin.model
django.contrib.admin.options.InlineModelAdmin.template
django.contrib.admin.options.ModelAdmin
django.contrib.admin.options.ModelAdmin.log_addition
django.contrib.admin.options.ModelAdmin.log_change
django.contrib.admin.options.ModelAdmin.log_deletion
django.contrib.admin.options.StackedInline
django.contrib.admin.options.TabularInline
django.contrib.admin.site
Expand Down Expand Up @@ -176,9 +170,6 @@ django.contrib.flatpages.models.FlatPage.url
django.contrib.gis.admin.GISModelAdmin
django.contrib.gis.admin.GISModelAdmin.gis_widget
django.contrib.gis.admin.ModelAdmin
django.contrib.gis.admin.ModelAdmin.log_addition
django.contrib.gis.admin.ModelAdmin.log_change
django.contrib.gis.admin.ModelAdmin.log_deletion
django.contrib.gis.admin.StackedInline
django.contrib.gis.admin.TabularInline
django.contrib.gis.admin.action
Expand Down
Loading