summaryrefslogtreecommitdiff
path: root/django/db/models/fields
AgeCommit message (Collapse)Author
2021-05-13[2.2.x] Fixed #32718 -- Relaxed file name validation in FileField.Mariusz Felisiak
- Validate filename returned by FileField.upload_to() not a filename passed to the FileField.generate_filename() (upload_to() may completely ignored passed filename). - Allow relative paths (without dot segments) in the generated filename. Thanks to Jakub Kleň for the report and review. Thanks to all folks for checking this patch on existing projects. Thanks Florian Apolloner and Markus Holtermann for the discussion and implementation idea. Regression in 0b79eb36915d178aef5c6a7bbce71b1e76d376d3. Backport of b55699968fc9ee985384c64e37f6cc74a0a23683 from main.
2021-04-27[2.2.x] Fixed CVE-2021-31542 -- Tightened path & file name sanitation in ↵Florian Apolloner
file uploads.
2019-11-04[2.2.x] Fixed #30931 -- Restored ability to override Model.get_FIELD_display().Carlton Gibson
Thanks Sergey Fedoseev for the implementation idea. Regression in a68ea231012434b522ce45c513d84add516afa60. Backport of 2d38eb0ab9f78d68c083a5b78b1eca39027b279a from master
2019-08-15[2.2.x] Fixed #30449 -- Fixed ↵zeyneloz
RelatedFieldListFilter/RelatedOnlyFieldListFilter to respect model's Meta.ordering. Regression in 6d4e5feb79f7eabe8a0c7c4b87f25b1a7f87ca0b. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com> Backport of 00035672a460b6eb5442d2837bc783f8af28c6f3 from master
2019-05-07[2.2.x] Fixed #26678 -- Doc'd that RelatedManager.add()/remove()/set() ↵Tobias Kunze
accepts the field the relation points to. Backport of a44a21a22f20c1a710670676fcca798dd6bb5ac0 from master
2019-04-19[2.2.x] Fixed #30328 -- Fixed crash of IntegerField.validators when ↵Scott Fitsimones
limit_value in a custom validator is callable. Backport of a14c0fda15db7e0eb982ac7b68d47b45fc95b4cb from master
2019-04-15[2.2.x] Fixed #30325 -- Reverted "Fixed #29725 -- Removed unnecessary join ↵Mariusz Felisiak
in QuerySet.count() and exists() on a many-to-many relation." This reverts commit 1299421cadc4fcf63585f2f88337078e43e660e0 due to a regression with custom managers. Backport of 5f7991c42cff73b6278106d499d719b726f85ead from master
2019-01-16Refs #9475 -- Simplified dictionary unpacking.Simon Charette
2019-01-15Refs #9475 -- Fixed typo, used unpacking generalization, and made ↵Nick Pope
through_defaults kwarg-only.
2019-01-15Fixed #9475 -- Allowed RelatedManager.add(), create(), etc. for m2m with a ↵Collin Anderson
through model.
2019-01-14Removed unnecessary string formatting of strings.Jon Dufresne
2019-01-11Moved django.db.migrations.writer.SettingsReference to django.conf.Tim Graham
Reduces the possibility of circular imports.
2019-01-02Used 4 space hanging indent for dictionaries.Tim Graham
Thanks Mariusz Felisiak for auditing.
2018-11-30Fixed #30001 -- Marked UUIDField.description for translation.Prabakaran Kumaresshan
2018-11-23Refs #23801 -- Made integer field max_length warning show correct field type.Nick Pope
2018-11-23Removed redundant BigIntegerField.empty_strings_allowed (already inherited).Nick Pope
2018-11-17Refs #29908 -- Optimized known related objects assignment.Simon Charette
Since CPython implements a C level attrgetter(*attrs) it even outperforms the most common case of a single known related object since the resulting attribute values tuple is built in C.
2018-11-14Fixed #29835 -- Made RelatedFieldListFilter respect ModelAdmin.ordering.Hasan Ramezani
2018-11-08Fixed #29908 -- Fixed setting of foreign key after related set access if ↵Simon Charette
ForeignKey uses to_field. Adjusted known related objects handling of target fields which relies on from and to_fields and has the side effect of fixing a bug bug causing N+1 queries when using reverse foreign objects. Thanks Carsten Fuchs for the report.
2018-10-24Fixed #29869 -- Made UUIDField.to_python() convert integers.Sanyam Khurana
2018-10-22Fixed #27595 -- Made ForeignKey.get_col() follow target chains.Simon Charette
Previously, foreign relationships were followed only one level deep which prevents foreign keys to foreign keys from being resolved appropriately. This was causing issues such as improper database value conversion for UUIDField on SQLite because the resolved expression's output field's internal type wasn't correct. Added tests to make sure unlikely foreign reference cycles don't cause recursion errors. Refs #24343. Thanks oyooyo for the report and Wayne Merry for the investigation.
2018-10-15Fixed #29725 -- Removed unnecessary join in QuerySet.count() and exists() on ↵oliver
a many-to-many relation.
2018-09-25Normalized spelling of "lowercase" and "lowercased".Jon Dufresne
2018-08-28Refs #27795 -- Removed force_bytes()/smart_text() from model fields.Jon Dufresne
2018-08-22Fixed #29698 -- Fixed Field._check_choices() crash on invalid choices.Franck Michea
2018-08-01Simplified comment in BooleanField.to_python().Tim Graham
2018-06-25Fixed #29447 -- Made RelatedManager.set() pass bulk argument to clear().Alexandr Tatarinov
2018-05-29Refs #28748 -- Reallowed lazy model field choices.Tim Graham
Regression in 3aa9ab39cce6b2a27d6334ad0148c8f37b6f5986.
2018-05-14Refs #28834 -- Moved ancestor field cached value fallback to related fields ↵Paulo
descriptor.
2018-05-10Fixed #27629 -- Added router.allow_relation() calls for assignments between ↵Stefan R. Filipek
unsaved model instances.
2018-04-20Fixed #29247 -- Allowed blank model field choice to be defined in nested ↵orlnub123
choices.
2018-04-17Fixed #29334 -- Updated pypi.python.org URLs to pypi.org.Brett Cannon
2018-03-20Refs #29227 -- Simplified NullBooleanField by making it subclass BooleanField.Nick Pope
2018-03-20Fixed #29227 -- Allowed BooleanField to be null=True.Tim Graham
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-03Added model name to AutoField error message.Almad
2018-02-20Fixed #28442 -- Fixed crash with nested OuterRefs that reference AutoField.Oliver Sauder
2018-02-05Refs #28814 -- Imported from collections.abc to fix Python 3.7 deprecation ↵Raymond Hettinger
warnings. https://bugs.python.org/issue25988
2018-02-05Refs #28723 -- Fixed stale prefetch_related cache after add/remove.Jon Dufresne
Regression in 514b2c989a948e3c59bda0da0c9427acf643cf5b.
2018-02-02Fixed imports per isort 4.3.1.Tim Graham
Partially reverted 9bcf73d788866bc93f8248cb2e9d601ecbc4b50c.
2018-02-01Fixed imports per isort 4.3.0.Mariusz Felisiak
2018-01-27Refs #28748 -- Reallowed lazy values in model field choices.François Freitag
Regression in f9844f484186fa13399bf8b96f58616687fe158a. Thanks Matthias Kestenholz for the report and suggestions.
2018-01-24Fixed #28748 -- Made model field choices check more strict for named groups.François Freitag
2018-01-12Fixed #28996 -- Simplified some boolean constructs and removed trivial ↵Дилян Палаузов
continue statements.
2018-01-03Fixed #28982 -- Simplified code with and/or.Дилян Палаузов
2018-01-03Fixed #28984 -- Made assorted code simplifications.Tim Graham
2018-01-03Fixed #28985 -- Removed unneeded None checks before hasattr().Дилян Палаузов
2018-01-02Removed DeferredAttribute.__init__()'s unused model argument.Mariusz Felisiak
Unused since a8a81aae20a81e012fddc24f3ede556501af64a2.
2017-12-28Fixed #28926 -- Fixed loss of precision of big DurationField values on ↵Sergey Fedoseev
SQLite and MySQL.
2017-12-26Refs #28459 -- Improved performance of loading DecimalField on SQLite.Sergey Fedoseev
2017-12-26Fixed #28930 -- Simplified code with any() and all().Дилян Палаузов