summaryrefslogtreecommitdiff
path: root/django/db
AgeCommit message (Collapse)Author
2013-12-10Fixed E124 pep8 warnings.Loic Bistuer
2013-12-06Corrected a flake8 issue -- this line is imported for the purpose of ↵Alex Gaynor
re-exposing the name
2013-12-06Fixed #21566 -- Fixed AttributeError when using bulk_create with ForeignObject.Roger Hu
2013-12-06Fixed #21554 -- Incorrect SQL generated when using multiple inheritance.pegler
2013-12-06Added missing deconstruct() methods.Baptiste Mispelon
2013-12-06Made the migration detector use meta.local_fields instead of meta.fields.Baptiste Mispelon
Refs #21010. Thanks to Loïc for the patch.
2013-12-06Fixed ModelState breaking when unique_together has unhashable elements.Baptiste Mispelon
2013-12-06Fixed error in ManyToManyField.deconstruct().Baptiste Mispelon
2013-12-06Added app_label to the error message when field reconstructing fails.Baptiste Mispelon
2013-12-06Merge pull request #2037 from bmispelon/invalidbaseserrorAndrew Godwin
Fixed TypeError when rendering ModelState with multiple bases.
2013-12-06Removed unreachable `else` in `try` block.maurycyp
2013-12-06Fixed TypeError when rendering ModelState with multiple bases.Baptiste Mispelon
2013-12-05Better error reporting when from_app_cache failsAndrew Godwin
2013-12-04Migration VCS conflict detection and --merge for makemigrationsAndrew Godwin
2013-12-04Don't make a second migration if there was a force-null-default addcol.Andrew Godwin
2013-12-04Add clone() method to Field to get clean copies of it.Andrew Godwin
2013-11-30Fixed comment typos.Alex Hill
2013-11-30Fixed #20867 -- Added the Form.add_error() method.Loic Bistuer
Refs #20199 #16986. Thanks @akaariai, @bmispelon, @mjtamlyn, @timgraham for the reviews.
2013-11-28Fixed a deprecation warning introduced by 96dd48c83f.Simon Charette
2013-11-29Use 'update_fields' in RelatedManager.clear() when bulk=False.Loic Bistuer
Thanks Simon Charette for the suggestion. Refs #21169.
2013-11-28Fixed E125 pep8 warningsChristopher Medrela
2013-11-27Added a bulk option to RelatedManager remove() and clear() methodsLoic Bistuer
Refs #21169
2013-11-27Used simpler queries for m2m clearing when possible.Anssi Kääriäinen
Refs #21169
2013-11-27Fixed #21169 -- Reworked RelatedManager methods use default filteringLoic Bistuer
The `remove()` and `clear()` methods of the related managers created by `ForeignKey`, `GenericForeignKey`, and `ManyToManyField` suffered from a number of issues. Some operations ran multiple data modifying queries without wrapping them in a transaction, and some operations didn't respect default filtering when it was present (i.e. when the default manager on the related model implemented a custom `get_queryset()`). Fixing the issues introduced some backward incompatible changes: - The implementation of `remove()` for `ForeignKey` related managers changed from a series of `Model.save()` calls to a single `QuerySet.update()` call. The change means that `pre_save` and `post_save` signals aren't called anymore. - The `remove()` and `clear()` methods for `GenericForeignKey` related managers now perform bulk delete so `Model.delete()` isn't called anymore. - The `remove()` and `clear()` methods for `ManyToManyField` related managers perform nested queries when filtering is involved, which may or may not be an issue depending on the database and the data itself. Refs. #3871, #21174. Thanks Anssi Kääriäinen and Tim Graham for the reviews.
2013-11-27Include deferred SQL in sqlmigrate outputAndrew Godwin
2013-11-27Fixed #21438: makemigrations now detects ManyToManyFieldsAndrew Godwin
2013-11-27Add gis deconstruct() method (this does not make schema work)Andrew Godwin
2013-11-27Change initial migration writing to work as docs suggest.Andrew Godwin
Application template now includes an empty migrations module, and the autodetector will only make initial migrations for apps with empty modules.
2013-11-27Fix squashed migration loading ordering issueAndrew Godwin
2013-11-24Fixed #21391 -- Allow model signals to lazily reference their senders.Simon Charette
2013-11-24Fixed #21497 -- Forced conversion to bytes for very long index namesJoel Bohman
2013-11-20Fixed #21469 -- Allow set objects in Meta.unique_together.Baptiste Mispelon
Thanks to Tim for the review.
2013-11-15Fixed the use of the -ise suffix, where -ize is preferedAlex Gaynor
2013-11-15Fixed typo and slightly improved error message when db is missing time zone ↵Loic Bistuer
definitions. Refs #21432.
2013-11-14Fixed #21432 -- DateTimeQuery now copies tzinfo when cloning.Loic Bistuer
Thanks Enrique Martínez for the report and @bmispelon for the tests.
2013-11-13Fixed #21410 -- prefetch_related() for ForeignKeys with related_name='+'Loic Bistuer
Regression introduced by commit 9777442. Thanks to trac username troygrosfield for the report and test case.
2013-11-09flake8 fixAlex Gaynor
2013-11-09Don't initialize PostGIS-specific stuff for non-db connectionsClaude Paroz
Refs #16969.
2013-11-09Fixed #16969 -- Don't connect to named database when possibleClaude Paroz
Thanks Andreas Pelme for the report and initial patch, and Aymeric Augustin, Shai Berger and Tim Graham for the reviews.
2013-11-07Fixed #17001 -- Custom querysets for prefetch_related.Loic Bistuer
This patch introduces the Prefetch object which allows customizing prefetch operations. This enables things like filtering prefetched relations, calling select_related from a prefetched relation, or prefetching the same relation multiple times with different querysets. When a Prefetch instance specifies a to_attr argument, the result is stored in a list rather than a QuerySet. This has the fortunate consequence of being significantly faster. The preformance improvement is due to the fact that we save the costly creation of a QuerySet instance. Thanks @akaariai for the original patch and @bmispelon and @timgraham for the reviews.
2013-11-07Fixed #20600 -- ordered distinct(*fields) in subqueriesAnssi Kääriäinen
2013-11-07Removed non-necessary code in Compiler._setup_joins()Anssi Kääriäinen
2013-11-07Removed Query.setup_joins() and join() argument outer_if_first.Anssi Kääriäinen
Instead always create new joins as OUTER.
2013-11-07Fixed #21376 -- New implementation for query join promotion logicAnssi Kääriäinen
This commit introduced a new class JoinPromoter that can be used to abstract away join promotion problems for complex filter conditions. Query._add_q() and Query.combine() now use the new class. Also, added a lot of comments about why join promotion is done the way it is. Thanks to Tim Graham for original report and testing the changes, and for Loic Bistuer for review.
2013-11-06flake8 fixesAlex Gaynor
2013-11-06Massive migration optimiser improvements + RenameModel opnAndrew Godwin
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-11-03Merge pull request #1861 from milmazz/E251Alex Gaynor
Fixed flake8 E251 violations
2013-11-03Fixed regressions from 36ded01527b690b5df0574492af9cfcc2ea3d1dc.Florian Apolloner
Refs #21302
2013-11-03Fixed flake8 E251 violationsMilton Mazzarri