Commit Graph

7 Commits

Author SHA1 Message Date
Luke Plant 4c4d08502c Fixed #17991 - prefetch_related fails with GenericRelation and varchar ID field
Thanks to okke@formsma.nl for the report, and carmandrew@gmail.com for the tests.
2012-10-29 14:31:54 +00:00
Aymeric Augustin d4a0b27838 [py3] Refactored __unicode__ to __str__.
* Renamed the __unicode__ methods
* Applied the python_2_unicode_compatible decorator
* Removed the StrAndUnicode mix-in that is superseded by
  python_2_unicode_compatible
* Kept the __unicode__ methods in classes that specifically
  test it under Python 2
2012-08-12 14:44:40 +02:00
Luke Plant 4fea46a030 Fixed #18309 - Prefetch related does not work for fkey to multitable inherited model
Thanks to milosu for the report, tests and initial patch.
2012-06-06 14:17:32 +01:00
Luke Plant b018128ea5 Fixed #17838 - prefetch_related fails for GenericForeignKeys when related object id is not a CharField/TextField
Thanks to mkai for the report and debugging, and tmitchell and Przemek
Lewandowski for their work on the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-15 15:06:57 +00:00
Alex Gaynor d5a45d79fe Convert all modeltests to use absolute imports, rather than relative ones.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 18:04:12 +00:00
Luke Plant 052a011ee6 Fixed #17003 - prefetch_related should support foreign keys/one-to-one
Support for `GenericForeignKey` is also included.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16939 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-07 16:05:53 +00:00
Luke Plant 662eea116f Fixed #16937 - added `QuerySet.prefetch_related` to prefetch many related objects.
Many thanks to akaariai for lots of review and feedback, bug finding,
additional unit tests and performance testing.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-05 23:14:52 +00:00