summaryrefslogtreecommitdiff
path: root/tests/modeltests/defer/tests.py
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
2012-06-26Fixed #17485 -- Made defer work with select_relatedAnssi Kääriäinen
This commit tackles a couple of issues. First, in certain cases there were some mixups if field.attname or field.name should be deferred. Field.attname is now always used. Another issue tackled is a case where field is both deferred by .only(), and selected by select_related. This case is now an error. A lot of thanks to koniiiik (Michal Petrucha) for the patch, and to Andrei Antoukh for review.
2012-05-27Fixed #18343 -- Cleaned up deferred model implementationAnssi Kääriäinen
Generic cleanup and dead code removal in deferred model field loading and model.__reduce__(). Also fixed an issue where if an inherited model with a parent field chain parent_ptr_id -> id would be deferred loaded, then accessing the id field caused caused a database query, even if the id field's value is already loaded in the parent_ptr_id field.
2012-03-13Refs #17876: enhanced new test to actually test underlying function, not ↵Karen Tracey
just ensure trying to use it does not raise an exception. Thanks Przemek Lewandowski. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-12Fix #17876: Corrected an exception (regression) raised where select_realted ↵Karen Tracey
and only is used on a proxy model. Thanks milosu and charettes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13Convert all modeltests to use absolute imports, rather than relative ones.Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23Allow "pk" as a field alias in QuerySet.only() calls.Malcolm Tredinnick
Thanks to GDorn for the patch. Fixed #15494. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16668 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12Migrated defer doctests. Thanks to Alex Gaynor.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13777 bcc190cf-cafb-0310-a4f2-bffc1f526a37