Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed #470 -- Added support for database defaults on fields. | Ian Foote | 2023-05-12 | 1 | -0/+6 |
| | | | | | | | | Special thanks to Hannes Ljungberg for finding multiple implementation gaps. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews. | ||||
* | Refs #33476 -- Applied Black's 2023 stable style. | David Smith | 2023-02-01 | 1 | -1/+0 |
| | | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0 | ||||
* | Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵ | Gregor Gärtner | 2022-10-08 | 1 | -1/+1 |
| | | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com> | ||||
* | Fixed #23353 -- Used "raise from" when raising TransactionManagementError. | David Wobrock | 2022-10-03 | 1 | -1/+2 |
| | | | | This change sets the __cause__ attribute to raised exceptions. | ||||
* | Fixed #33733 -- Preserved wrapper assignment for manager methods. | kshivakumar | 2022-06-01 | 1 | -0/+8 |
| | |||||
* | Refs #33733 -- Added tests for attributes of manager methods. | Mariusz Felisiak | 2022-06-01 | 1 | -0/+4 |
| | |||||
* | Fixed #33646 -- Added async-compatible interface to QuerySet. | Andrew Godwin | 2022-04-26 | 1 | -0/+18 |
| | | | | | | | Thanks Simon Charette for reviews. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> | ||||
* | Removed redundant QuerySet.all() calls in docs and tests. | Nick Pope | 2022-02-22 | 1 | -3/+3 |
| | | | | Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager. | ||||
* | Refs #33476 -- Refactored code to strictly match 88 characters line length. | Mariusz Felisiak | 2022-02-07 | 1 | -1/+4 |
| | |||||
* | Refs #33476 -- Reformatted code with Black. | django-bot | 2022-02-07 | 1 | -183/+268 |
| | |||||
* | Improved Model.__init__() properties loop. | Adam Johnson | 2022-01-13 | 1 | -1/+11 |
| | | | | | This improves readability, accumulates unrecognized arguments raise an exception with all of them, and avoids refetching the values. | ||||
* | Fixed #24141 -- Added QuerySet.contains(). | Johan Schiff | 2021-03-06 | 1 | -0/+1 |
| | |||||
* | Fixed #22640 -- Raised TypeError when instantiating model with keyword and ↵ | Jacob Walls | 2021-03-01 | 1 | -0/+9 |
| | | | | positional args for the same field. | ||||
* | Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly. | Hasan Ramezani | 2020-11-06 | 1 | -19/+17 |
| | | | | | | | | This also replaces assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate. Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> | ||||
* | Fixed #27719 -- Added QuerySet.alias() to allow creating reusable aliases. | Alexandr Tatarinov | 2020-07-31 | 1 | -0/+1 |
| | | | | | | | | QuerySet.alias() allows creating reusable aliases for expressions that don't need to be selected but are used for filtering, ordering, or as a part of complex expressions. Thanks Simon Charette for reviews. | ||||
* | Fixed #29129 -- Skipped UPDATE when adding a model instance with inherited ↵ | Abhijeet Viswa | 2020-03-05 | 1 | -2/+8 |
| | | | | primary key that has a default. | ||||
* | Simplified imports from django.db and django.contrib.gis.db. | Nick Pope | 2020-02-04 | 1 | -4/+4 |
| | |||||
* | Fixed #30651 -- Made __eq__() methods return NotImplemented for not ↵ | ElizabethU | 2019-10-01 | 1 | -0/+2 |
| | | | | | | | | | implemented comparisons. Changed __eq__ to return NotImplemented instead of False if compared to an object of the same type, as is recommended by the Python data model reference. Now these models can be compared to ANY (or other objects with __eq__ overwritten) without returning False automatically. | ||||
* | Fixed #29260 -- Skipped an UPDATE when adding a model instance with primary ↵ | Hasan Ramezani | 2019-08-19 | 1 | -1/+9 |
| | | | | key that has a default. | ||||
* | Fixed #6785 -- Made QuerySet.get() fetch a limited number of rows. | Amir Hadi | 2019-05-12 | 1 | -1/+21 |
| | | | | | | Co-authored-by: Tim Graham <timograham@gmail.com> Co-authored-by: Patryk Zawadzki <patrys@room-303.com> Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com> | ||||
* | Refs #30254 -- Added tests for Model.__hash__() inheritance. | Carlton Gibson | 2019-04-24 | 1 | -1/+18 |
| | |||||
* | Switched setUp() to setUpTestData() where possible in Django's tests. | Simon Charette | 2018-11-27 | 1 | -3/+4 |
| | |||||
* | Added a test for a lookup in Model.refresh_from_db(fields=[...]). | Hasan Ramezani | 2018-11-15 | 1 | -0/+6 |
| | |||||
* | Used QuerySet.bulk_create() in a couple tests. | oliver | 2018-11-06 | 1 | -26/+10 |
| | |||||
* | Fixed #23646 -- Added QuerySet.bulk_update() to efficiently update many models. | Tom Forbes | 2018-09-18 | 1 | -0/+1 |
| | |||||
* | Fixed #29625 -- Made Model.refresh_from_db() clear prefetch related caches. | Ming Qin | 2018-08-20 | 1 | -0/+24 |
| | |||||
* | Fixed #29517 -- Rephrased error message when passing incorrect kwarg to ↵ | Federico Bond | 2018-06-25 | 1 | -1/+1 |
| | | | | model constructor | ||||
* | Fixed #28574 -- Added QuerySet.explain(). | Tom | 2018-04-19 | 1 | -0/+1 |
| | |||||
* | Fixed #29076 -- Made Model.refresh_from_db() clear cached relationships even ↵ | Jon Dufresne | 2018-01-30 | 1 | -0/+12 |
| | | | | if the related id doesn't change. | ||||
* | Fixed #27846 -- Made Model.refresh_from_db() clear cached relations. | Paulo | 2017-10-12 | 1 | -1/+12 |
| | |||||
* | Removed DatabaseFeatures.supports_microsecond_precision. | Tim Graham | 2017-09-25 | 1 | -39/+5 |
| | | | | MySQL 5.5 (refs #28552) was the last database to use it. | ||||
* | Used assertRaisesMessage() to test Django's error messages. | Mads Jensen | 2017-07-29 | 1 | -7/+13 |
| | |||||
* | Fixed #28249 -- Removed unnecessary dict.keys() calls. | Jon Dufresne | 2017-05-27 | 1 | -1/+1 |
| | | | iter(dict) is equivalent to iter(dict.keys()). | ||||
* | Converted usage of ugettext* functions to their gettext* aliases | Claude Paroz | 2017-02-07 | 1 | -4/+4 |
| | | | | Thanks Tim Graham for the review. | ||||
* | Refs #23919 -- Replaced super(ClassName, self) with super(). | chillaranand | 2017-01-25 | 1 | -1/+1 |
| | |||||
* | Refs #23919 -- Removed encoding preambles and future imports | Claude Paroz | 2017-01-18 | 1 | -2/+0 |
| | |||||
* | Fixed #27718 -- Added QuerySet.union(), intersection(), difference(). | Florian Apolloner | 2017-01-14 | 1 | -0/+3 |
| | | | | Thanks Mariusz Felisiak for review and Oracle assistance. Thanks Tim Graham for review and writing docs. | ||||
* | Moved test_field_ordering to the model_fields package. | Morgan Aubert | 2016-12-14 | 1 | -17/+0 |
| | |||||
* | Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. | za | 2016-11-10 | 1 | -4/+3 |
| | |||||
* | Fixed #26787 -- Documented deleting and reloading of model instance fields. | Tim Graham | 2016-06-21 | 1 | -0/+13 |
| | | | | Thanks Julien Hartmann for the report. | ||||
* | Fixed #26747 -- Used more specific assertions in the Django test suite. | Jon Dufresne | 2016-06-16 | 1 | -2/+2 |
| | |||||
* | Fixed #26620 -- Made Model.refresh_from_db() fail when passed unknown kwargs. | Marti Raudsepp | 2016-05-18 | 1 | -0/+5 |
| | |||||
* | Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify ↵ | Loïc Bistuer | 2016-05-17 | 1 | -6/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | models' default and base managers. This deprecates use_for_related_fields. Old API: class CustomManager(models.Model): use_for_related_fields = True class Model(models.Model): custom_manager = CustomManager() New API: class Model(models.Model): custom_manager = CustomManager() class Meta: base_manager_name = 'custom_manager' Refs #20932, #25897. Thanks Carl Meyer for the guidance throughout this work. Thanks Tim Graham for writing the docs. | ||||
* | Fixed E128 flake8 warnings in tests/. | Tim Graham | 2016-04-08 | 1 | -20/+19 |
| | |||||
* | Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as ↵ | Hasan | 2016-01-29 | 1 | -55/+20 |
| | | | | appropriate. | ||||
* | Refs #26022 -- Used context manager version of assertRaises in tests. | Hasan | 2016-01-29 | 1 | -6/+2 |
| | |||||
* | Fixed #26026 -- Fixed isinstance crash comparing EmptyQuerySet to non-QuerySet. | Anderson Resende | 2016-01-07 | 1 | -0/+1 |
| | |||||
* | Fixed #25715 -- Fixed Model.refresh_from_db() with ForeignKey ↵ | Tim Graham | 2015-11-21 | 1 | -0/+11 |
| | | | | w/on_delete=SET_NULL. | ||||
* | Refs #21414 -- Removed Field.related per deprecation timeline. | Tim Graham | 2015-09-23 | 1 | -15/+0 |
| | |||||
* | Tweak some examples. | Aymeric Augustin | 2015-08-22 | 1 | -13/+13 |
| | | | | | "Area man/woman" is confusing to people not familiar with the conventions of American journalism (like me). |