summaryrefslogtreecommitdiff
path: root/django/contrib/admin/views
AgeCommit message (Collapse)Author
2026-02-13Fixed #36857 -- Added QuerySet.totally_ordered property.VIZZARD-X
Thanks Simon Charette for the idea.
2026-01-22Fixed #13883 -- Rendered named choice groups with <optgroup> in ↵seanhelvey
FilteredSelectMultiple. This patch adds support for <optgroup>s in FilteredSelectMultiple widgets. When a popup returns a new object, if the source field contains optgroup choices, the optgroup is now also included in the response data. Additionally, this adds error handling for invalid source_model parameters to prevent crashes and display user-friendly error messages instead. Co-authored-by: Michael McLarnon <mmclar@gmail.com>
2026-01-12Fixed #36708 -- Initialized formset to None in ChangeList.__init__().Rudraksha Dwivedi
Thanks Antoliny for the review.
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-01-15Refs #22569 -- Made request required in ModelAdmin.lookup_allowed() per ↵Sarah Boyce
deprecation timeline.
2024-09-11Fixed #35747 -- Used default ordering when the ORDER_VAR param is blank in ↵ldeluigi
the admin changelist.
2024-02-20Fixed #35236 -- Used Field.attname/column attributes instead of ↵Adam Johnson
get_attname()/get_attname_column().
2024-02-05Fixed #10743 -- Allowed lookups for related fields in ModelAdmin.list_display.Tom Carrick
Co-authored-by: Alex Garcia <me@alexoteiza.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> Co-authored-by: Nina Menezes <https://github.com/nmenezes0>
2023-07-07Refs #9602 -- Moved AlreadyRegistered/NotRegistered exceptions to ↵Mariusz Felisiak
django.contrib.admin.exceptions.
2023-07-07Fixed #9602 -- Added AdminSite.get_model_admin().Mariusz Felisiak
This allows retrieving an admin class for the given model class without using internal attributes.
2023-07-07Fixed #34639 -- Reverted "Fixed #32682 -- Made admin changelist use Exists() ↵Simon Charette
instead of distinct() for preventing duplicates." This reverts commit 187118203197801c6cb72dc8b06b714b23b6dd3d which moved to using Exists() instead due to an overly strict distinct().delete() check added in #32433.
2023-05-24Refs #34593 -- Commented that the extra count is necessary in ↵David Sanders
ChangeList.get_results().
2023-04-17Fixed #22569 -- Made ModelAdmin.lookup_allowed() respect get_list_filter().sarahboyce
Thank you Simon Meers for the initial patch.
2023-03-16Fixed #1873 -- Handled multi-valued query parameters in admin changelist ↵sarahboyce
filters.
2023-03-16Refs #1873 -- Used GET.lists() in admin filters.sarahboyce
2023-03-03Fixed #32539 -- Added toggleable facet filters to ModelAdmin.sarahboyce
Thanks Carlton Gibson, Simon Willison, David Smith, and Mariusz Felisiak for reviews.
2023-01-18Refs #34233 -- Used str.removeprefix()/removesuffix().Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-08-10Fixed #32993 -- Added AutocompleteJsonView.serialize_result() to allow ↵Mart Sõmermaa
customization.
2021-06-07Refs #24121 -- Added __repr__() to ChangeList and BaseStorage.saeedblanchette
2021-05-26Fixed #32543 -- Added search_help_text to ModelAdmin.Hasan Ramezani
2021-05-19Fixed #32766 -- Removed unused ORDER_TYPE_VAR.David Sanders
Unused since 5434ce231d75004bdbe5cf2b7b24ce67a2a6e737.
2021-04-29Refs #32682 -- Renamed lookup_needs_distinct() to lookup_spawns_duplicates().Mariusz Felisiak
Follow up to 187118203197801c6cb72dc8b06b714b23b6dd3d.
2021-04-27Fixed #32682 -- Made admin changelist use Exists() instead of distinct() for ↵Mariusz Felisiak
preventing duplicates. Thanks Zain Patel for the report and Simon Charette for reviews. The exception introduced in 6307c3f1a123f5975c73b231e8ac4f115fd72c0d revealed a possible data loss issue in the admin.
2021-04-27Refs #32682 -- Renamed use_distinct variable to may_have_duplicates.Mariusz Felisiak
QuerySet.distinct() is not the only way to avoid duplicate, it's also not preferred.
2021-03-18Fixed #32466 -- Corrected autocomplete to_field resolution for complex cases.Johannes Maron
In MTI or ForeignKey as primary key cases, it is required to fetch the attname from the field instance on the remote model in order to reliably resolve the to_field_name. Co-authored-by: Johannes Maron <info@johanneshoppe.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2021-01-12Fixed #29010, Fixed #29138 -- Added limit_choices_to and to_field support to ↵Johannes Maron
autocomplete fields. * Fixed #29010 -- Added limit_choices_to support to autocomplete fields. * Fixed #29138 -- Allowed autocomplete fields to target a custom to_field rather than the PK.
2020-08-06Refs #25513 -- Adjusted admin pagination to be 1-indexed.Nick Pope
2020-05-20Fixed #31597, #31603 -- Corrected admin clear all filters link behavior.Fran Hrzenjak
- Show "Clear all filters" only when any filter is selected. - Preserve query string not related with filters. Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2020-02-19Fixed #31187 -- Fixed detecting of existing total ordering in admin ↵Fabio Sangiovanni
changelist when using Meta.constraints. Detection of existing total ordering in admin changelist now takes into account non-partial unique constraints.
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2019-11-19Fixed #30981 -- Fixed admin changelist crash when using F() or OrderBy() ↵Hasan Ramezani
expressions in admin_order_field.
2019-10-29Fixed #30922 -- Fixed ModelAdmin.date_hierarchy queries with DST changes.Erwin Junge
There was an issue where admin date_hierarchy didn't render last day of a month in DST-switch month.
2019-08-22Fixed #30064 -- Added form to validate admin search fields query input.Carlton Gibson
2019-03-24Fixed #30259 -- Added support for admin_order_field attribute on properties ↵Jani Tiainen
in ModelAdmin.list_display.
2019-02-27Removed AutocompleteJsonView.paginator_class.Johannes Hoppe
Unused since its introduction in 94cd8efc50c717cd00244f4b2233f971a53b205e.
2019-02-06Fixed #30159 -- Removed unneeded use of OrderedDict.Nick Pope
Dicts preserve order since Python 3.6.
2019-01-17Refs #17198 -- Detected existing total ordering in admin changelist.Simon Charette
Appending pk is not necessary when a subset of the ordering expressions is contained in a non-nullable unique contraint. Related field ordering through lookups and related ordering introspection is omitted for simplicitly purpose.
2018-08-06Fixed #28529 -- Fixed VariableDoesNotExist warnings in admin templates.Vlastimil Zíma
2018-06-18Fixed #29502 -- Allowed users with the view permission to use ↵Carlton Gibson
autocomplete_fields.
2018-06-14Fixed #29428 -- Fixed admin changelist crash when using a query expression ↵Tim Graham
without asc()/desc() in the ordering.
2018-05-23Fixed #29417 -- Corrected two admin page titles for view-only users.Ramiro Morales
2018-02-15Fixed #27810 -- Allowed query expressions in admin_order_field.Andreas Pelme
2018-02-14Fixed #28933 -- Improved the efficiency of ModelAdmin.date_hierarchy queries.Haki Benita
2018-02-07Fixed #25790 -- Allowed disable column sorting in the admin changelist.Alexander Gaevsky
Thanks Ramiro Morales for completing the patch.
2018-01-12Fixed #28996 -- Simplified some boolean constructs and removed trivial ↵Дилян Палаузов
continue statements.
2018-01-03Fixed #28982 -- Simplified code with and/or.Дилян Палаузов
2017-12-27Fixed #28958 -- Fixed admin changelist crash when using a query expression ↵Mariusz Felisiak
in the page's ordering. Thanks Tim Graham for the review.
2017-12-07Fixed #28907 -- Removed unnecessary if statements.Tim Graham
2017-09-18Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ↵Johannes Hoppe
ManyToManyField in the admin. Thanks Florian Apolloner and Tim Graham for review and contributing to the patch.