summaryrefslogtreecommitdiff
path: root/django/contrib/contenttypes/admin.py
AgeCommit message (Collapse)Author
2026-04-07Fixed CVE-2026-4277 -- Checked add permissions in GenericInlineModelAdmin.Jacob Walls
Edit permissions were still checked as part of ordinary form validation, but because GenericInlineModelAdmin overrides get_formset(), it lacked InlineModelAdmin's dynamic DeleteProtectedModelForm.has_changed() logic for checking permissions server-side, leaving the add case unaddressed. This change reimplements the relevant part of InlineModelAdmin.get_formset(). Thanks N05ec@LZU-DSLab for the report, and Natalia Bidart, Markus Holtermann, and Simon Charette for reviews.
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.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-12-29Used model's Options.label where applicable.Mariusz Felisiak
Follow up to b7a3a6c9ef0a89625881b47594120bca55fa2e49.
2017-12-11Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.Nick Pope
2017-12-04Fixed #28860 -- Removed unnecessary len() calls.Дилян Палаузов
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-04-13Refs #16508 -- Renamed the current "virtual" fields to "private".Michal Petrucha
The only reason why GenericForeignKey and GenericRelation are stored separately inside _meta is that they need to be cloned for every model subclass, but that's not true for any other virtual field. Actually, it's only true for GenericRelation.
2016-02-12Removed unneeded hint=None/obj=None in system check messages.Tim Graham
2015-09-11Fixed #25374 -- Made ModelAdmin checks work on instances instead of classes.Malcolm Box
This allows dynamically-generated attributes to be specified in checked ModelAdmin attributes without triggering errors.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-02Fixed #9104 -- Moved FieldDoesNotExist to core.exceptionsDaniel Pyrathon
2014-09-24Fixed #23539 -- Added get_extra(), get_max_num(), and get_min_num() hooks to ↵Justin Caratzas
GenericInlineModelAdmin.
2014-05-15Fixed #17642 -- Added min_num support to modelformsets, inlines, and the admin.Anders Steinlein
Thanks Stephen Burrows for work on the patch as well. Forwardport of 2914f66983a92fcae55673c517dd8d01e8c238c4 from stable/1.7.x
2014-03-08Fixed #22034 -- Added a specific set of relation checks for ↵Russell Keith-Magee
GenericInlineModelAdmin. Thanks to jwa for the report.
2014-01-26Fixed #19774 -- Deprecated the contenttypes.generic module.Simon Charette
It contained models, forms and admin objects causing undesirable import side effects. Refs #16368. Thanks to Ramiro, Carl and Loïc for the review.