summaryrefslogtreecommitdiff
path: root/django/contrib/admin/views/main.py
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-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-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.
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-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-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-07-29Avoided creation of temporary sets.Sergey Fedoseev
2017-03-04Refs #27795 -- Removed unneeded force_text callsClaude Paroz
Thanks Tim Graham for the review.
2017-02-07Converted usage of ugettext* functions to their gettext* aliasesClaude Paroz
Thanks Tim Graham for the review.
2017-02-04Refs #27656 -- Updated django.contrib docstring verb style according to PEP 257.Anton Samarchyan
2017-01-22Refs #23919 -- Replaced six.reraise by raiseClaude Paroz
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2016-12-06Fixed #18729 -- Made admin changelist not use distinct() if a list_filter ↵nmhung89
doesn't require it.
2016-06-08Fixing #26524 -- Made a foreign key id reference in ModelAdmin.list_display ↵krishbharadwaj
display the id.