summaryrefslogtreecommitdiff
path: root/django/db/models
AgeCommit message (Collapse)Author
2015-03-17Fixed #24486 -- Fixed error with datetime and DurationField arithmeticJosh Smeaton
2015-03-17Fixed #15579 -- Added ability to delete only child models in multi-table ↵Andriy Sokolovskiy
inheritance.
2015-03-09Fixed #24171 -- Fixed failure with complex aggregate query and expressionsAnssi Kääriäinen
The query used a construct of qs.annotate().values().aggregate() where the first annotate used an F-object reference and the values() and aggregate() calls referenced that F-object. Also made sure the inner query's select clause is as simple as possible, and made sure .values().distinct().aggreate() works correctly.
2015-03-06Fixed #24420 -- Allowed ordering by case expressionsJosh Smeaton
2015-02-27Fixed #24418 -- Prevented crash in refresh_from_db with null fkClaude Paroz
Thanks Johannes Lerch for the report, Tim Graham for the test case, and Simon Charette for the review.
2015-02-23Fixed #24381 -- removed ForeignObjectRel opts and to_optsAnssi Kääriäinen
These cached properies were causing problems with pickling, and in addition they were confusingly defined: field.rel.model._meta was not the same as field.rel.opts. Instead users should use field.rel.related_model._meta inplace of field.rel.opts, and field.rel.to._meta in place of field.rel.to_opts.
2015-02-21Fixed #24376 -- added verbose_name arg to UUIDFieldMichael Angeletti
2015-02-20Fixed typo in django/db/models/fields/files.py comment.Don Kirkby
2015-02-20Fixed #24328 -- cleaned up Options._get_fields() implementationAnssi Kääriäinen
2015-02-20Fixed #24351, #24346 -- Changed the signature of allow_migrate().Loic Bistuer
The new signature enables better support for routing RunPython and RunSQL operations, especially w.r.t. reusable and third-party apps. This commit also takes advantage of the deprecation cycle for the old signature to remove the backward incompatibility introduced in #22583; RunPython and RunSQL won't call allow_migrate() when when the router has the old signature. Thanks Aymeric Augustin and Tim Graham for helping shape up the patch. Refs 22583.
2015-02-20Update converters to take a consistent set of parameters.Marc Tamlyn
As suggested by Anssi. This has the slightly strange side effect of passing the expression to Expression.convert_value has the expression passed back to it, but it allows more complex patterns of expressions.
2015-02-20Fixed #24343 -- Ensure db converters are used for foreign keys.Marc Tamlyn
Joint effort between myself, Josh, Anssi and Shai.
2015-02-16Reworked docstrings and comments in related.py.Loic Bistuer
Thanks Tim Graham for the review.
2015-02-16Merged ManyRelatedObjectsDescriptor and ReverseManyRelatedObjectsDescriptorLoic Bistuer
and made all "many" related objects descriptors inherit from ForeignRelatedObjectsDescriptor.
2015-02-14Fixed #24289 -- Reversed usage of Field.many_to_one and one_to_many.Loic Bistuer
Thanks Carl Meyer and Tim Graham for the reviews and to all involved in the discussion.
2015-02-13Fixed #24319 -- Added validation for UUID model fieldJosh Smeaton
2015-02-12Refs #24215 -- Prevented pending lookup pollution by abstract models.Simon Charette
2015-02-12Refs #14030 -- Improved expression support for python valuesJosh Smeaton
2015-02-10Fixed #24146 -- Allowed model._meta.get_field() to be used after ↵Daniel Pyrathon
apps.models_ready
2015-02-10Disallowed importing concrete models without an application.Aymeric Augustin
Removed fragile algorithm to find which application a model belongs to. Fixed #21680, #21719. Refs #21794.
2015-02-09Fixed #24302 -- Added DurationField.formfield()Tim Graham
2015-02-09Removed unnecessary parentheses in model check messages.Tim Graham
2015-02-09Fixed #24249 -- Improved field shadowing validation in model multi-inheritance.Aron Podrigal
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-05Added UUIDField.deconstruct()Tim Graham
2015-02-05Fix small regression caused by 71ada3a8e689a883b5ffdeb1744ea16f176ab730.Loic Bistuer
During direct assignment, evaluating the iterable before the transaction is started avoids leaving the transaction dirty if an exception is raised. This is slightly more wasteful but probably not enough to warrant a change of behavior. Thanks Anssi for the feedback. Refs #6707.
2015-02-05Fixed #6707 -- Added RelatedManager.set() and made descriptors' __set__ use it.Loic Bistuer
Thanks Anssi Kääriäinen, Carl Meyer, Collin Anderson, and Tim Graham for the reviews.
2015-02-04Removed non-used EmptyShortCircuitAnssi Kääriäinen
2015-02-04Removed EverythingNodeAnssi Kääriäinen
At the same time, made sure that empty nodes in where clause match everything.
2015-02-04Fixed #24268 -- removed Query.havingAnssi Kääriäinen
Instead of splitting filter clauses to where and having parts before adding them to query.where or query.having, add all filter clauses to query.where, and when compiling the query split the where to having and where parts.
2015-02-03Fixed #15321 -- Honored ancestors unique checks.Aron Podrigal
Thanks to Tim for the review.
2015-02-03Fixed #24266 -- Changed get_parent_list to return a list ordered by MRO.Simon Charette
Thanks to Aron Podrigal for the initial patch and Tim for the review.
2015-02-03Reverted "Fixed #24146 -- Fixed a missing fields regression in admin checks."Tim Graham
This reverts commit e8171daf0cd7f0e070395cb4c850c17fea32f11d. A new solution is forthcoming.
2015-02-03Fixed #23617 -- Added get_pk_value_on_save()Anssi Kääriäinen
The method is mainly intended for use with UUIDField. For UUIDField we want to call the field's default even when primary key value is explicitly set to None to match the behavior of AutoField. Thanks to Marc Tamlyn and Tim Graham for review.
2015-02-01Removed query.alias_diff()Tim Graham
This function is unused since 6fe2b001dba45134d7c10729c57959995e241a88
2015-02-01Removed Query.raise_field_error()Tim Graham
This method was inadvertently reintroduced in f59fd15c4928caf3dfcbd50f6ab47be409a43b01
2015-01-30Fixed #14483 -- Allowed using subqueries with GIS lookupsClaude Paroz
2015-01-30Reverted "Fixed #6785 -- Made QuerySet.get() fetch a limited number of rows."Tim Graham
This reverts commit da79ccca1d34f427952cce4555e598a700adb8de. This optimized the unsuccessful case at the expense of the successful one.
2015-01-30Fixed #24211 -- Removed ValuesQuerySet() and ValuesListQuerySet().Loic Bistuer
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
2015-01-30Fixed #24164 -- Fixed Oracle GIS limited aggregation test failure.Tim Graham
2015-01-29Fixed #23940 -- Allowed model fields to be named `exact`.Simon Charette
An explicit `__exact` lookup in the related managers filters was interpreted as a reference to a foreign `exact` field. Thanks to Trac alias zhiyajun11 for the report, Josh for the investigation, Loïc for the test name and Tim for the review.
2015-01-29Removed ForeignObjectRel.get_lookup_constraint() [unused].Tim Graham
2015-01-28Refs #14030 -- Renamed CombinableMixin to CombinableJosh Smeaton
Removed unused method and updated docstrings.
2015-01-28Refs #14030 -- Added repr methods to all expressionsJosh Smeaton
2015-01-27Fixed #24210 -- Cleaned up relational fields __init__().Loic Bistuer
Thanks Collin Anderson and Tim Graham for the reviews.
2015-01-27Fixed #24154 -- Backends can now check support for expressionsJosh Smeaton
2015-01-22Fixed small inconsistency when handling aggregate's default_alias.Loic Bistuer
Refs #14030.
2015-01-20Fixed a query failure on Python 3.5; refs #23763.Tim Graham
The failure was introduced in Django by c7fd9b242d2d63406f1de6cc3204e35aaa025233 and the change in Python 3.5 is https://hg.python.org/cpython/rev/a3c345ba3563.
2015-01-20Fixed #24183 -- Fixed wrong comparisons in SubstrJosh Smeaton
2015-01-19Advanced deprecation warnings for Django 1.9.Tim Graham