19 Commits

Author SHA1 Message Date
Anssi Kääriäinen
25496f0f7b [1.9.x] Fixed #26153 -- Reallowed Q-objects in ForeignObject.get_extra_descriptor_filter().
Backport of 353aecbf8c1a8cc6f3985149e2895d49e53dfc1c from master
2016-02-11 09:00:38 -05:00
Tomo Otsuka
bc5eed8fb0 [1.9.x] Fixed #25972 -- Restored support for the isnull lookup with ForeignObject.
Backport of 8b6974a6857bdc48ad50bf21527b840c27648891 from master
2015-12-24 07:35:08 -05:00
Simon Charette
fb016e6c55 [1.9.x] Refs #25745 -- Isolated a foreign_object test.
Backport of 2eefbca1a4140d8a8174a06a1f0160fcc76d8f64 from master
2015-11-14 12:08:34 -05:00
Ville Skyttä
a3bbc38d54 [1.9.x] Fixed #25668 -- Misc spelling errors
Backport of 3ee18400ae9b916da1a3bee9c9c630fd223a2d3c from master
2015-11-03 10:33:05 +00:00
Antoine Catton
38d6e1e2ad [1.9.x] Fixed #25535 -- Made ForeignObject checks less strict.
Check that the foreign object `from_fields` are a subset of any unique
constraints on the foreign model.

Backport of 80dac8c33e7f6f22577e4346f44e4c5ee89b648c and
c7aff31397a7228f6ac2e33c10ebdf36c4b7a9b7 from master
2015-10-14 05:26:42 -07:00
Tim Graham
825429c1f7 Moved foreign_object models.py into a module. 2015-08-14 08:53:35 -04:00
Alex Hill
b47e862d3a Added test for ForeignObject.get_extra_descriptor_filter() 2015-08-03 08:27:53 -04:00
Tim Graham
0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Preston Timmons
1da1fe8e16 Ensured foreign_object tests reset language properly. 2014-12-02 07:31:52 -05:00
Berker Peksag
f7969b0920 Fixed #23620 -- Used more specific assertions in the Django test suite. 2014-11-03 11:56:37 -05:00
Roger Hu
bbc73e6a12 Fixed #21566 -- Fixed AttributeError when using bulk_create with ForeignObject. 2013-12-06 20:20:16 +01:00
Jason Myers
7a61c68c50 PEP8 cleanup
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02 23:50:49 -05:00
Anssi Kääriäinen
dcdc579d16 Fixed #20874 -- bump_prefix() in nested subqueries
Also made some cleanup to build_filter() code by introducing submethods
solve_lookup_type() and prepare_lookup_value().
2013-08-13 14:11:52 +03:00
Anssi Kääriäinen
263b873599 Fixed ordering related test failure
Also PEP8 + python_2_unicode_compatible cleanup done.
2013-08-06 10:07:52 +03:00
Anssi Kääriäinen
92476e880c Fixed ._meta.pk_index() virtual field failure 2013-07-25 16:25:23 +03:00
Andrew Godwin
99b467f272 Add related_query_name to ForeignKey/M2M. Refs #20244 2013-06-27 14:44:21 +01:00
Tim Graham
6f8627dd7f Fixed #17582 - Added message to DoesNotExist exceptions.
Thanks simon@ for the suggestion and JordanPowell
for the initial patch.
2013-05-27 07:57:06 -04:00
Luke Plant
f026a519ae Fixed #19733 - deprecated ModelForms without 'fields' or 'exclude', and added '__all__' shortcut
This also updates all dependent functionality, including modelform_factory
 and modelformset_factory, and the generic views `ModelFormMixin`,
 `CreateView` and `UpdateView` which gain a new `fields` attribute.
2013-05-09 16:44:36 +01:00
Anssi Kääriäinen
266de5f9ae Fixed 19385 -- Added ORM support for multicolumn joins
This patch iproved two major parts in Django. First, the fields.related
was refactored. The main addition there was ForeignObject. Second, the
ORM now handles multicolumn joins in most cases, though there are still
cases that do not work correcly (split_exclude() for example).

In addition there were extesive changes to how GenericRelation works.
Before it was a fake m2m field, now it is a pure virtual fields and is
based on ForeignObject.

There is still much room for improvement. The related fields code is
still somewhat confusing, and how fields are represented in model._meta
should also be revisited.

This patch was written mostly by Jeremy Tillman with some final polish
by the committer.
2013-03-24 18:08:01 +02:00