Commit Graph

1897 Commits

Author SHA1 Message Date
Akshesh 311a8e8d50 Fixed #20888 -- Added support for column order in class-based indexes. 2016-08-12 15:52:16 -04:00
Ryan P Kilby 7aeb7390fc Fixed #26891 -- Fixed lookup registration for ForeignObject. 2016-08-11 14:16:48 -04:00
Chris Sinchok ac1975b18b Fixed #13809 -- Made FieldFile.open() respect its mode argument. 2016-08-09 12:53:18 -04:00
Simon Charette b8e6e1b43b
Fixed #26500 -- Added SKIP LOCKED support to select_for_update().
Thanks Tim for the review.
2016-08-08 12:01:43 -04:00
Johannes Dollinger 46509cf13d Moved EmpytResultSet to django.core.exceptions.
This removes the need for some inner imports.
2016-08-08 10:43:34 -04:00
Johannes Dollinger c002a0d39f Fixed #26517 -- Fixed ExpressionWrapper with empty queryset. 2016-08-08 10:43:33 -04:00
Johannes Dollinger 1410616e0e Fixed #26433 -- Fixed Case expressions with empty When. 2016-08-08 10:43:33 -04:00
Sjoerd Job Postmus 3246d2b4bb Fixed #27026 -- Fixed state initialization of bulk_create() objects if can_return_ids_from_bulk_insert. 2016-08-06 10:24:57 -04:00
Akshesh 6a8372e6ec Fixed #26808 -- Added Meta.indexes for class-based indexes.
* Added the index name to its deconstruction.
* Added indexes to sqlite3.schema._remake_table() so that indexes
  aren't dropped when _remake_table() is called.

Thanks timgraham & MarkusH for review and advice.
2016-08-05 18:12:51 -04:00
Yoong Kang Lim d30febb4e5 Fixed #26706 -- Made RelatedManager modification methods clear prefetch_related() cache. 2016-08-05 13:32:27 -04:00
Claude Paroz 272eccf7ff Fixed #26983 -- Fixed isnull filtering on ForeignKey with to_field
Thanks weidwonder for the report.
2016-08-04 16:05:21 +02:00
Akshesh b92c6b7d56 Refs #26709 -- Replaced Index.get_name() with set_name_with_model().
This removes the dependency of the Index class on its 'model'
attribute.
2016-08-02 14:21:41 -04:00
Tim Graham 5fa4370543 Refs #25550 -- Corrected deprecation message for assigning M2M relations. 2016-07-30 20:50:09 -04:00
Kevan Swanberg 17a0a6667c Refs #26796 -- Fixed ManyToManyField's limit_choices_to warning without a through model. 2016-07-21 14:29:03 -04:00
Simon Charette 271bfe65d9
Fixed #26916 -- Fixed prefetch_related when using a cached_property as to_attr.
Thanks Trac alias karyon for the report and Tim for the review.
2016-07-19 16:05:07 -04:00
Tim Graham 7c33aa8a87 Fixed #26900 -- Fixed crash accessing deferred FileFields. 2016-07-16 08:22:24 -04:00
Jensen Cochran d44afd8892 Fixed #26804 -- Fixed a race condition in QuerySet.update_or_create(). 2016-07-14 12:10:19 -04:00
Kenneth 841cb45847 Fixed #26884 -- Evaluated callables in QuerySet.update_or_create()'s defaults when updating. 2016-07-12 22:09:53 -04:00
Andrey Fedoseev 81963b37a9 Fixed #17657 -- Made ModelForm respect ModelMultipleChoiceField's to_field_name.
Follow up to 67d984413c.
2016-07-12 16:20:06 -04:00
Julien Hartmann f4afb85d7e Fixed #26749 -- Preserved behavior of use_for_related_field during deprecation. 2016-07-11 13:30:44 -04:00
Anderson Resende ba53da894f Fixed #26796 -- Added a system check for m2m fields with ignored limit_choices_to. 2016-07-08 19:37:40 -04:00
Simon Charette 8a4f017f45 Fixed #26348 -- Added TruncTime and exposed it through the __time lookup.
Thanks Tim for the review.
2016-07-08 12:35:34 -04:00
Simon Charette 082c52dbed Refs #25774, #26348 -- Allowed Trunc functions to operate with time fields.
Thanks Josh for the amazing testing setup and Tim for the review.
2016-07-08 12:35:34 -04:00
Akshesh 52442898e7 Refs #26709 -- Added 'model' argument to SchemaEditor.add/remove_index()
This removes the dependency of the Index class on its model attribute
when a name is passed to it.

Thanks to Markush for discussions.
2016-07-07 10:06:55 -04:00
Berker Peksag 12b4280444 Fixed #21548 -- Added FileExtensionValidator and validate_image_file_extension. 2016-06-30 09:08:50 -04:00
Andrew Nester baff4dd37d Fixed #25292 -- Fixed crash in ManyToManyField.through_fields check. 2016-06-30 08:53:38 -04:00
David Sanders a84344bc53 Fixed #19513, #18580 -- Fixed crash on QuerySet.update() after annotate(). 2016-06-29 14:08:13 -04:00
Eduard Stepanov 49b4596cb4 Fixed #26786 -- Avoided redundant max value validators on integer fields. 2016-06-28 11:39:20 -04:00
Ben Demboski 2224a56631 Fixed #26784 -- Made ForeignKey.validate() pass `model` to router if model_instance=None. 2016-06-27 13:33:37 -04:00
Akshesh 156e2d59cf Fixed #26709 -- Added class-based indexes.
Added the AddIndex and RemoveIndex operations to use them in migrations.

Thanks markush, mjtamlyn, timgraham, and charettes for review and advice.
2016-06-27 10:41:01 -04:00
Tim Graham 9bf8d50a67 Fixed #26778 -- Fixed ModelSignal.connect() weak argument. 2016-06-18 20:45:38 -04:00
Tim Graham 7def55c3f6 Reverted "Fixed #26398 -- Made FieldFile.open() respect its mode argument."
This reverts commit a52a531a8b due to
regressions described in refs #26772.
2016-06-17 21:04:02 -04:00
Jon Dufresne 267dc4addd Fixed #4136 -- Made ModelForm save empty values for nullable CharFields as NULL.
Previously, empty values were saved as strings.
2016-06-13 09:14:36 -04:00
Berker Peksag 0bce2f102c Fixed #12810 -- Added a check for clashing ManyToManyField.db_table names. 2016-06-10 10:57:22 -04:00
Michal Petrucha 686a593aaa Fixed #26648 -- Added a system check for invalid related_query_name's containing underscores. 2016-06-09 11:57:32 -04:00
Michal Petrucha effb4ed6f5 Replaced a hardcoded LOOKUP_SEP in models/fields/__init__.py 2016-06-09 11:57:00 -04:00
Sergey Fedoseev 21130ce1a9 Fixed #26718 -- Added system check for existence of the fields specified by ForeignKey.to_field. 2016-06-09 10:19:09 -04:00
Tim Graham 908c26b079 Fixed typos in db/models/fields/related_descriptors.py 2016-06-07 08:53:05 -04:00
Paulo 1a2a7cc01e Fixed typo in db/models/fields/related_descriptors.py 2016-06-07 08:50:06 -04:00
Paulo 3e9f769fd1 Refs #15250 -- Added docstring for ForwardOneToOneDescriptor. 2016-06-07 07:22:32 -04:00
Tim Graham e2296e7f0a Fixed #26667 -- Fixed a regression in queries on a OneToOneField that has to_field and primary_key=True.
Thanks Simon Charette for review.
2016-06-04 08:04:51 -04:00
Paulo 38575b007a Fixed #15250 -- Avoided extra query on some multi-table inheritance queries.
Thanks marekw2143 for the initial patch and carljm for support.
2016-06-03 10:18:24 -04:00
Will Koster 9899347641 Fixed #26638 -- Allowed callable arguments for QuerySet.get_or_create()/update_or_create() defaults. 2016-06-03 10:00:53 -04:00
Alex Hill 08014fe75b Fixed #26686 -- Fixed crash when registering model signals with abstract senders. 2016-06-02 14:34:01 -04:00
Simon Charette 53a5fb3cc0 Fixed #26676 -- Prevented prefetching to_attr from caching its result in through attr.
Thanks Ursidours for the report.
2016-05-31 14:32:58 -04:00
Tim Graham a4c20ae85b Refs #24227 -- Fixed crash of ManyToManyField.value_from_object() on unsaved model instances.
This behavior was removed in 67d984413c
but is needed to prevent a crash in formtools.
2016-05-28 15:41:47 -04:00
Alex Hill ff6c6feae1 Fixed #26642 -- Made ModelSignal.disconnect() work with lazy references. 2016-05-27 17:45:08 -04:00
Alex Hill 779bb82f51 Fixed #26421 -- Refactored ModelSignal to use Apps.lazy_model_operation() 2016-05-19 21:33:36 -04:00
Alex Hill 2ff7ef15b0 Refs #26421 -- Refactored Apps.lazy_model_operation() for better checks and tests 2016-05-19 21:33:36 -04:00
Tim Graham 546649f2d6 Fixed some newlines in imports per isort. 2016-05-19 11:05:44 -04:00