summaryrefslogtreecommitdiff
path: root/django/contrib/admin/sites.py
AgeCommit message (Collapse)Author
2026-02-20Fixed #36127 -- Applied default empty display value to links otherwise ↵SiHyunLee
containing only whitespace in admin.
2025-11-12Fixed #36717 -- Redirect authenticated users on admin login view to next URL.Benedict Etzel
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
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-30Fixed #36121 -- Allowed customizing the admin site password change form.Mohammadreza Eskandari
2024-11-29Fixed #373 -- Added CompositePrimaryKey.Bendeguz Csirmaz
Thanks Lily Foote and Simon Charette for reviews and mentoring this Google Summer of Code 2024 project. Co-authored-by: Simon Charette <charette.s@gmail.com> Co-authored-by: Lily Foote <code@lilyf.org>
2024-11-11Fixed #35903 -- Made admin's "view on site" URL accept non-integer ↵Tim Graham
ContentType pks.
2024-05-22Fixed #31405 -- Added LoginRequiredMiddleware.Hisham Mahmood
Co-authored-by: Adam Johnson <me@adamj.eu> Co-authored-by: Mehmet İnce <mehmet@mehmetince.net> Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
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-06Used AdminSite.is_registered() where appropriate.Mariusz Felisiak
2023-06-05Fixed #34621 -- Made admin site header render in <div> tag.Howard Cox
This was problematic for screen reader users because they use headings to navigate. Having two <h1> is confusing, and the one in the header wasn’t particularly helpful since it’s the same on all pages.
2023-03-03Fixed #34377 -- Fixed preserving query strings in AdminSite.catch_all_view().Dominique Bischof
Included full path when redirecting with append slash to include query strings. Regression in ba31b0103442ac891fb3cb98f316781254e366c3.
2023-02-08Fixed #34303 –- Allowed customizing admin site log entry list.Jacob Rief
Added AdminSite.get_log_entries() as an override point and made this available to the template via each_context().
2023-01-18Refs #34233 -- Used str.removeprefix()/removesuffix().Mariusz Felisiak
2022-03-25Fixed #7497 -- Allowed overriding the order of apps and models in admin.adontz
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-01-13Refs #32681 -- Fixed VariableDoesNotExist when rendering some admin template.Mariusz Felisiak
Regression in 84609b3205905097d7d3038d32e6101f012c0619. Follow up to 4e5bbb6ef2287126badd32842b239f4a8a7394ca. Thanks Sourav Kumar for the report.
2021-07-05Refs #24121 -- Added __repr__() to AdminSite, DefaultAdminSite, and ModelAdmin.Eduardo Aldair Ahumada Garcia Jurado
Thanks tlebrize for the initial patch.
2021-05-18Fixed #32754 -- Made AdminSite.catch_all_view() respect SCRIPT_NAME.Slava Skvortsov
Regression in ba31b0103442ac891fb3cb98f316781254e366c3.
2021-05-13Fixed #32031 -- Added model class for each model to AdminSite.each_context().Raffaele Salmaso
2021-04-26Fixed #32681 -- Fixed VariableDoesNotExist when rendering some admin template.Zain Patel
Regression in 84609b3205905097d7d3038d32e6101f012c0619.
2021-03-03Fixed #32493 -- Removed redundant never_cache uses from admin views.tim-mccurrach
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2021-02-24Fixed #32468 -- Corrected usage of never_cache in contrib.admin.Haki Benita
2021-01-12Fixed #31747 -- Fixed model enumeration via admin URLs.Jon Dufresne
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-11-14Refs #24474 -- Changed AdminSite.empty_value_display property to an attribute.Nick Pope
This was implemented with a property getter and setter when introduced in 0207bdd2d4157c542c981264c86706b78ca246e9. There is nothing special occurring here though - a simple read from and assign to the underlying private attribute.
2020-09-23Fixed #32034 -- Removed redundant get_app_config() call in AdminSite.app_index.Raffaele Salmaso
app_config.verbose_name is already in app_dict.
2020-07-30Bumped minimum isort version to 5.1.0.David Smith
Fixed inner imports per isort 5. isort 5.0.0 to 5.1.0 was unstable.
2020-05-11Fixed #31034 -- Added a navigation sidebar to the admin.Tom Carrick
Co-authored-by: elky <elky@users.noreply.github.com> Co-authored-by: Goetz <goetz.buerkle@gmail.com>
2019-03-25Fixed #27360 -- Added app or ModelAdmin details for AreadyRegistered exceptions.Hasan Ramezani
2018-08-06Fixed #28529 -- Fixed VariableDoesNotExist warnings in admin templates.Vlastimil Zíma
2018-05-16Fixed #8936 -- Added a view permission and a read-only admin.olivierdalang
Co-authored-by: Petr Dlouhy <petr.dlouhy@email.cz> Co-authored-by: Olivier Dalang <olivier.dalang@gmail.com>
2018-02-03Fixed #8500 -- Allowed overriding the default admin site instance.Raffaele Salmaso
2018-01-03Fixed #28982 -- Simplified code with and/or.Дилян Палаузов
2017-12-11Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.Nick Pope
2017-09-20Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201.Sjoerd Job Postmus
Thanks Aymeric Augustin for shepherding the DEP and patch review. Thanks Marten Kenbeek and Tim Graham for contributing to the code. Thanks Tom Christie, Shai Berger, and Tim Graham for the docs.
2017-09-07Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."Tim Graham
This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda because try/except performs better.
2017-08-23Removed unneeded iter() calls.Sergey Fedoseev
A few of these were unnecessarily added in 2b281cc35ed9d997614ca3c416928d7fabfef1ad.
2017-06-28Fixed #27818 -- Replaced try/except/pass with contextlib.suppress().Mads Jensen
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-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-10Fixed #26961 -- Made admin checks run when DEBUG=False.Adam Chainz
2017-01-10Fixed #27673 -- Made admin's checks run at check time instead of during ↵Adam Chainz
registration. Thanks Morgan Aubert for the test.
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-10-13Fixed #26954 -- Prevented ModelAdmin.has_module_permission()=False from ↵Halil Kaya
blocking access to the app index page.
2016-07-16Fixed #17209 -- Added password reset/change class-based viewsClaude Paroz
Thanks Tim Graham for the review.
2016-06-27Fixed #26779 -- Added extra_context parameter to admin's i18n_javascript view.Shabda Raaj