summaryrefslogtreecommitdiff
path: root/django/db/models/fields
AgeCommit message (Collapse)Author
2014-12-12[1.7.x] Fixed #23455 -- Accept either bytes or text for related_name, ↵Carl Meyer
convert to text. Backport of c72eb80d114fb5d90bd21b5549e8abd0bbd17f99 from master.
2014-12-12[1.7.x] Revert "Fixed #23455 -- Forced related_name to be a unicode string ↵Carl Meyer
during deconstruction." This reverts commit 45bd7b3bd9008941580c100b9fc7361e3ff3ff0d. This is a backport of 8aaf51f94c70e3cfcd2c75a0be1b6f55049d82d8 from master.
2014-11-03[1.7.x] Fixed #23420 - broken warning for unbound naive datetime objectsAndy Chosak
Fixed issue with warning message displayed for unbound naive datetime objects when USE_TZ is True. Adds unit test that demonstrates the issue (discoverable when using a custom lookup in MySQL). Backport of ceb1ffcc8d from master. Conflicts: tests/custom_lookups/tests.py
2014-10-08[1.7.x] Fixed #23611 -- update_or_create failing from a related managerAndré Ericson
Added update_or_create to RelatedManager, ManyRelatedManager and GenericRelatedObjectManager. Added missing get_or_create to GenericRelatedObjectManager. Conflicts: tests/generic_relations/tests.py tests/get_or_create/tests.py Backport of ed37f7e979 from master
2014-09-25[1.7.x] Fixed #23455 -- Forced related_name to be a unicode string during ↵Markus Holtermann
deconstruction. Backport of 45bd7b3bd9 from master
2014-08-14[1.7.x] Fixed #23288: deconstruct() ignoring related_nameAndrew Godwin
2014-08-03[1.7.x] Fixed #23156 -- Added missing BinaryField.deconstruct() method.Baptiste Mispelon
Backport of 72f1eb48df335c110f39d56f7978d95896a56bb8 from master.
2014-08-03[1.7.x] Added missing logic to TimeField.deconstruct().Baptiste Mispelon
If auto_now or auto_now_add was used then the serialized field in the migration contained unnecessary `editable` and `blank` arguments. Backport of 74325339327e5b8a2480aee7f482bc71f73c71f9 from master.
2014-08-03[1.7.x] Removed unnecessary code in ManyToManyField.deconstruct()Baptiste Mispelon
Backport of 44169a00c1fe7c130a8b9774e3b02ccce524a3eb from master.
2014-07-30[1.7.x] Fixed #23112 -- Field.get_choices tries to index an iterableareski
Backport of 97a38de230371c0b6ad8a86abba8425186c147c7 from master.
2014-07-27[1.7.x] Fixed #23098 -- Checked that lazy choices are not evaluated too soonFlorian Apolloner
Thanks Matthieu Agopian for the report. Backport of 2f73b527dda6683868fac2791f7f07ccb01ea0d9 from master.
2014-07-26Fixed #23101 db_table wasn't copied in deconstructAbraham Martin
2014-07-26[1.7.x] Fixed #22887 -- Added comment for translators on unique_for_date ↵Federico Frenguelli
error message Backport of 6eed751162 from master.
2014-07-05[1.7.x] Fixed various minor doc typos / references.Daniel Hahler
Backport of 67f9f385aa from master
2014-06-23[1.7.x] Fixed #22889: Unneeded to_field in fk.deconstruct causing swap issuesAndrew Godwin
2014-05-22[1.7.x] Fixed #22421 -- Regression in fixtures loading.Ramiro Morales
Loading fixtures were failing since the refactoring in 244e2b71f5 for inheritance setups where the chain contains abstract models and the root ancestor contains a M2M relation. Thanks Stanislas Guerra for the report. Refs #20946. Backport of 862e1ff234 from master
2014-05-06[1.7.x] Fixed #22564 -- Prevented unneeded bytestrings in migrationsClaude Paroz
In some cases, this could lead to migrations written with Python 2 being incompatible with Python 3. Thanks Tim Graham for the report and Loïc Bistuer for the advices. Backport of da9cf53cb from master.
2014-05-06[1.7.x] Added a bunch of missing unicode_literalsClaude Paroz
Refs #22564. Backport of 12474dace from master.
2014-04-26[1.7.x] Fix many many typos in comments throughout the codebaseAlex Gaynor
Backport of 2bcb8bfc8d from master
2014-04-21[1.7.x] Fixed queries that may return unexpected results on MySQL due to ↵Erik Romijn
typecasting. This is a security fix. Disclosure will follow shortly. Backport of 75c0d4ea3ae48970f788c482ee0bd6b29a7f1307 from master
2014-04-21[1.7.x] Appeased flake8 2.1.0.Aymeric Augustin
Backport of 428c0bbe1bcd303560d7e96d7d2721ff3fdc0e3f from master
2014-04-13[1.7.x] Fixed #21760 -- prefetch_related used an inefficient query for ↵valtron
reverse FK. Regression introduced by commit 9777442. Refs #21410. Backport of d3b71b976d from master
2014-03-26[1.7.x] Fixed the PostGIS circular imports caused by 1506c71a95.Simon Charette
Thanks to @loic for the help and @timgraham for the review. refs #12030. Backport of b9e50e4774 from master
2014-03-25[1.7.x] Fixed field deconstruction tests failures introduced by 1506c71a95.Simon Charette
refs #12030. Backport of ff874f363c from master
2014-03-25[1.7.x] Fixed #12030 -- Validate integer field range at the model level.Simon Charette
Thanks to @timgraham for the review. Backport of 1506c71a95 from master
2014-03-14Fixed #22001 -- Ensure db_type is respected.Marc Tamlyn
db_parameters should respect an already existing db_type method and return that as its type string. In particular, this was causing some fields from gis to not be generated. Thanks to @bigsassy and @blueyed for their work on the patch. Also fixed #22260
2014-03-14Fixed #22272 -- Fixed regression in DecimalField when using decimal_places=0.Baptiste Mispelon
Thanks to trac user merb for the report.
2014-03-11Fixed #22217 - ManyToManyField.through_fields fixes.Akis Kesoglou
- Docs description of arguments mix up. - Keep it from erroneously masking E332 check. - Add checks E338 and E339, tweak message of E337.
2014-03-08Fix weird autodetector errorAndrew Godwin
2014-03-08Fixed #22183: Through M2Ms now correctly handledAndrew Godwin
2014-03-08Fixed #22199: Bad max_length deconstruction for FileFieldAndrew Godwin
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2014-03-06Revert "Fixed #22183: Don't make a table for M2Ms with through="Andrew Godwin
This reverts commit 1562b9896f8f614ef40fd032b1ec777280b377c1.
2014-03-06Fixed #22183: Don't make a table for M2Ms with through=Andrew Godwin
2014-03-05Fixed #14549 - Removed restriction of single FKs on intermediary tablesAkis Kesoglou
Thanks to Loic Bistuer for review. Minor changes to error messages done by committer.
2014-03-05Fixed #22206 -- Passed models.TextField.max_length to forms.CharField.maxlengthChris Wilson
2014-03-04Fixed typo in internal CharField methodChris Wilson
2014-03-03Allowed custom querysets when prefetching single valued relationsLoic Bistuer
The original patch for custom prefetches didn't allow usage of custom queryset for single valued relations (along ForeignKey or OneToOneKey). Allowing these enables calling performance oriented queryset methods like select_related or defer/only. Thanks @akaariai and @timgraham for the reviews. Refs #17001.
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03Edited model and field checks for grammar and consistency.Russell Keith-Magee
2014-02-15Fixed #22047 -- detecting related_name clash with inheritanceChristopher Medrela
Thanks to mondone for fruitful colaboration.
2014-02-15Fixed #19299 -- Fixed Nullification of Foreign Keys To CharFieldsAlbert Wang
Thanks tunixman for the report and Baptiste Mispelon and Shai Berger for reviews.
2014-02-11Fixed #2445 -- Allowed limit_choices_to attribute to be a callable.Christopher Adams
ForeignKey or ManyToManyField attribute ``limit_choices_to`` can now be a callable that returns either a ``Q`` object or a dict. Thanks michael at actrix.gen.nz for the original suggestion.
2014-02-10Fixed #17673 -- Forbid field shadowing.Christopher Medrela
Thanks Anssi Kääriäinen for the suggestion.
2014-02-09Fixed #21763 -- Added an error msg for missing methods on ManyRelatedManager.Robert Stapenhurst
Attempting to add() and remove() an object related by a 'through' model now raises more descriptive AttributeErrors, in line with set and create().
2014-02-08Fixed #16192 -- Made unique error messages in ModelForm customizable.Loic Bistuer
Overriding the error messages now works for both unique fields, unique_together and unique_for_date. This patch changed the overriding logic to allow customizing NON_FIELD_ERRORS since previously only fields' errors were customizable. Refs #20199. Thanks leahculver for the suggestion.
2014-01-25Unroll choices iterators in field deconstructionAndrew Godwin
2014-01-20Removed an inactive system check for upload_to.Russell Keith-Magee
Thanks to Simon Charette for the eagle eyes.
2014-01-19Fixed a small collection of flake8 violations that had snuck inAlex Gaynor
2014-01-20Fixed #16905 -- Added extensible checks (nee validation) frameworkRussell Keith-Magee
This is the result of Christopher Medrela's 2013 Summer of Code project. Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian Apolloner, and Alex Gaynor for review notes along the way. Also: Fixes #8579, fixes #3055, fixes #19844.