Commit Graph

23 Commits

Author SHA1 Message Date
Jannis Leidel 24f4764a48 Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Jannis Leidel dbffffa7dc Fixed #5535 -- Allow using an explicit foreign key in get() calls. Thanks, Michal Petrucha.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16473 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-28 10:16:18 +00:00
Alex Gaynor fcf8312ade Made clear() on a reverse foreign key significantly more efficient. Thanks to Andrew Godwin for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-07 20:51:59 +00:00
Russell Keith-Magee 634d0a92b8 Migrated many-to-one doctests. Thanks to George Sakkis for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 04:58:59 +00:00
Russell Keith-Magee 3508a86ddf Fixed #12876 -- Corrected a problem with recursive relations under deepcopy. Thanks to elachuni for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-07 07:11:22 +00:00
Russell Keith-Magee ff60c5f9de Fixed #1142 -- Added multiple database support.
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project.
Congratulations to Alex for a job well done.

Big thanks also go to:
 * Justin Bronn for keeping GIS in line with the changes,
 * Karen Tracey and Jani Tiainen for their help testing Oracle support
 * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback.
 * Malcolm Treddinick for his guidance during the GSoC submission process.
 * Simon Willison for driving the original design process
 * Cal Henderson for complaining about ponies he wanted.

... and everyone else too numerous to mention that helped to bring this feature into fruition.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 15:18:51 +00:00
Jacob Kaplan-Moss 6ce25d3be9 Fixed #10413: RelatedManager.add no longer fails silenty when trying to add an object of the wrong type. Thanks, dgouldin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:41:49 +00:00
Gary Wilson Jr 1697f4e49f Fixed a couple typos in the modeltests' descriptions and made use of ReST inline literal markup for code snippets.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8325 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 14:15:38 +00:00
Gary Wilson Jr 2db4b13480 Fixed #8070 -- Cache related objects passed to Model init as keyword arguments. Also:
* Model init no longer performs a database query to refetch the related objects it is passed.
 * Model init now caches unsaved related objects correctly, too. (Previously, accessing the field would raise `DoesNotExist` error for `null=False` fields.)
 * Added tests for assigning `None` to `null=True` `ForeignKey` fields (refs #6886).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 23:16:59 +00:00
Jacob Kaplan-Moss 46786b4193 Fixed #7741: django.newforms is now django.forms. This is obviously a backwards-incompatible change. There's a warning upon import of django.newforms itself, but deeper imports will raise errors.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 01:22:26 +00:00
Russell Keith-Magee b9113ca81f Fixed #7327 -- Added documentation and test case for defining subqueries. Thanks, Sebastian Noack.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-12 13:19:37 +00:00
Adrian Holovaty 9c53847ef4 Added some tests to modeltests/many_to_one that demonstrate a post-queryset-refactor bug in dates(). Refs #7097
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 00:03:01 +00:00
Malcolm Tredinnick 9c52d56f6f Merged the queryset-refactor branch into trunk.
This is a big internal change, but mostly backwards compatible with existing
code. Also adds a couple of new features.

Fixed #245, #1050, #1656, #1801, #2076, #2091, #2150, #2253, #2306, #2400, #2430, #2482, #2496, #2676, #2737, #2874, #2902, #2939, #3037, #3141, #3288, #3440, #3592, #3739, #4088, #4260, #4289, #4306, #4358, #4464, #4510, #4858, #5012, #5020, #5261, #5295, #5321, #5324, #5325, #5555, #5707, #5796, #5817, #5987, #6018, #6074, #6088, #6154, #6177, #6180, #6203, #6658


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-27 02:50:16 +00:00
Gary Wilson Jr 212ee65be7 Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms `FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05 05:14:46 +00:00
Malcolm Tredinnick 953badbea5 Merged Unicode branch into trunk (r4952:5608). This should be fully
backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:11:04 +00:00
Adrian Holovaty 1889db475d Fixed comma splice in error message introduced in [5133]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5154 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-06 04:12:08 +00:00
Malcolm Tredinnick d943f5ae92 Fixed #4130 -- Added more self-explanatory error message when a typo is made in
a queryset field argument.

We may need to fine-tune the error message based on experience down the line,
but this stands as an improvement on its own. Thanks, Ned Batchelder.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-01 03:21:54 +00:00
Russell Keith-Magee 97b9ad73b4 Refs #2333 - Modified runtests script to use new testing framework. Migrated existing tests to use Django testing framework. All the 'othertests' have been migrated into 'regressiontests', and converted into doctests/unittests, as appropriate.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-27 13:59:47 +00:00
Russell Keith-Magee cd7b54aab0 Fixes #2271 -- Added code to imply !__exact on any query argument that doesn't finish with a known query term.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 03:14:33 +00:00
Russell Keith-Magee c81d69354a Fixed #2217 -- Allowed raw objects to be used in __exact and __in query terms. Existing use of primary keys in query terms is preserved.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 01:14:41 +00:00
Adrian Holovaty a5b7c29816 Changed all model unit tests to use __str__() instead of __repr__(). Also slightly changed related-object DoesNotExist exception message to use repr instead of str
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-04 00:23:51 +00:00
Malcolm Tredinnick 1006d6eb06 Fixed #1530 -- make count() respect distinct() on QuerySets. Create some
tests for this as well. Thanks to Adam Endicott for the original patch on which
this is based.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@2902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-14 23:49:29 +00:00
Adrian Holovaty f69cf70ed8 MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00