summaryrefslogtreecommitdiff
path: root/django/db/models
AgeCommit message (Collapse)Author
2014-05-06Added a bunch of missing unicode_literalsClaude Paroz
Refs #22564.
2014-05-05Fixed #22466 -- ordering by reverse foreign keyAnssi Kääriäinen
Ordering by reverse foreign key was broken by custom lookups patch (commit 20bab2cf9d02a5c6477d8aac066a635986e0d3f3). Thanks to everybody who helped solving this issue. Special thanks to Trac alias takis for reporting this.
2014-05-05Fixed #22489 -- missing implemenation for search lookupJakub Roztocil
When custom lookups were added, converting the search lookup to use the new Lookup infrastructure wasn't done. Some changes were needed to the added test, main change done by committer was ensuring the test works on MySQL versions prior to 5.6.
2014-05-05Fixed #22429 -- Incorrect SQL when using ~Q and FAnssi Kääriäinen
2014-05-03Moved misplaced transaction.atomic from 0dce44e16bClaude Paroz
Thanks Florian Apolloner for noticing the issue and Aymeric Augustin for the expertise. Refs #22540.
2014-05-02Fixed #22540 -- Made _create_object_from_params() call create()Claude Paroz
So as the save step is centralized in create(), especially useful when customizing behavior in subclasses. Thanks craig.labenz@gmail.com for the report.
2014-05-01Fixed #22539 -- Copied exclude argument in Model.full_clean() to prevent ↵Yehonatan Daniv
side effects.
2014-04-30Fixed #19195 -- Allow explicit ordering by a relation `_id` field.Simon Charette
Thanks to chrisedgemon for the report and shaib, akaariai and timgraham for the review.
2014-04-29Use the new implementation of `six.with_metaclass`.Simon Charette
No more `NewBase` horrors. Thanks to bendavis78 for his work on merging this into six.
2014-04-26Fix many many typos in comments throughout the codebaseAlex Gaynor
2014-04-21Fixed queries that may return unexpected results on MySQL due to typecasting.Erik Romijn
This is a security fix; disclosure to follow shortly.
2014-04-21Appeased flake8 2.1.0.Aymeric Augustin
2014-04-16Fixed #22434 -- Retain ordering on related sliced subqueries.Justin Hamade
Thanks maciej.pawlisz for the report, and charettes for the review.
2014-04-14Fixed #22356 -- Added a check to make sure unique_together fields are local.Marc Egli
2014-04-13Fixed #21760 -- prefetch_related used an inefficient query for reverse FK.valtron
Regression introduced by commit 9777442. Refs #21410.
2014-04-10Fixed #22343 -- Disallowed select_for_update in autocommit modeShai Berger
The ticket was originally about two failing tests, which are fixed by putting their queries in transactions. Thanks Tim Graham for the report, Aymeric Augustin for the fix, and Simon Charette, Tim Graham & Loïc Bistuer for review.
2014-04-05Fixed #22236 -- Removed inappropriate usage of signalsClaude Paroz
Thanks Aymeric Augustin for the report and Tim Graham for the review.
2014-03-30Corrected many style guide violations that the newest version of flake8 catchesAlex Gaynor
2014-03-30Fixed #19816 -- Pre-evaluate querysets used in direct relation assignments.Loic Bistuer
Since assignments on M2M or reverse FK descriptors is composed of a `clear()`, followed by an `add()`, `clear()` could potentially affect the value of the assigned queryset before the `add()` step; pre-evaluating it solves the problem. This patch fixes the issue for ForeignRelatedObjectsDescriptor, ManyRelatedObjectsDescriptor, and ReverseGenericRelatedObjectsDescriptor. It completes 6cb6e1 which addressed ReverseManyRelatedObjectsDescriptor.
2014-03-30Fixed transaction handling for a number of operations on related objects.Loic Bistuer
Thanks Anssi and Aymeric for the reviews. Refs #21174.
2014-03-26Fixed the PostGIS circular imports caused by 1506c71a95.Simon Charette
Thanks to @loic for the help and @timgraham for the review. refs #12030.
2014-03-25Fixed field deconstruction tests failures introduced by 1506c71a95.Simon Charette
refs #12030.
2014-03-25Fixed #12030 -- Validate integer field range at the model level.Simon Charette
Thanks to @timgraham for the review.
2014-03-21Removed legacy transaction management per the deprecation timeline.Aymeric Augustin
2014-03-21Removed Model._meta.module_name per deprecation timeline.Tim Graham
refs #19689.
2014-03-21Removed PIL compatability layer per deprecation timeline.Tim Graham
refs #19934.
2014-03-21Removed Model._meta.get_(add|change|delete)_permission methods per ↵Tim Graham
deprecation timeline.
2014-03-21Removed backward compatible shims to rename get_query_set and similar ↵Tim Graham
queryset methods. Also removed the backward compatible shims introduced to rename the attributes ChangeList.root_query_set and ChangeList.query_set.
2014-03-20Fixed #22163 -- Stopped ignoring unhandled kwargs in select_for_update.Aymeric Augustin
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-12Flake8 correctionsShai Berger
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-10Fixed #22210 -- Saving model instances to non-related fields.Daniel Pyrathon
Previously, saving a model instance to a non-related field (in particular a FloatField) would silently convert the model to an Integer (the pk) and save it. This is undesirable behaviour, and likely to cause confusion so the validatio has been hardened. Thanks to @PirosB3 for the patch and @jarshwah for the review.
2014-03-08Fix weird autodetector errorAndrew Godwin
2014-03-084 flake8 warning fixesAlex Gaynor
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-07Fixed #21863 -- supplemented get_lookup() with get_transform()Anssi Kääriäinen
Also fixed #22124 -- Expanded explanation of exactly what is going on in as_sql() methods.
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 #22207 -- Added support for GenericRelation reverse lookupsGabe Jackson
GenericRelation now supports an optional related_query_name argument. Setting related_query_name adds a relation from the related object back to the content type for filtering, ordering and other query operations. Thanks to Loic Bistuer for spotting a couple of important issues in his review.
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-03-03Edited model check messages for grammar and consistency.Russell Keith-Magee