Commit Graph

712 Commits

Author SHA1 Message Date
Russell Keith-Magee 848fbdc3e7 Fixed #13432 -- Corrected the logic for router use on OneToOne fields; also added a bunch of tests for OneToOneField queries. Thanks to piquadrat for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13037 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-28 04:20:35 +00:00
Russell Keith-Magee dd07c23545 Fixed #12749 -- Corrected a problem with validation of inline primary keys. Thanks to Chris.Wesseling@cwi.nl for the report, and nessita for the test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-27 15:05:38 +00:00
Russell Keith-Magee dccc5ac0a6 Refs #13427 -- Removed translation from verbose_name and verbose_name_plural on autogenerated m2m models.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-27 14:42:55 +00:00
Russell Keith-Magee 2f9eef1227 Fixed #13407 -- Corrected verbose names for autogenerated m2m models, and cleaned up the default form prefix when an autogenerated m2m through model is used in a formset. Thanks to carljm for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-27 12:35:49 +00:00
Russell Keith-Magee d9a0fd48ba Fixed #11764 -- Added a missing set of parentheses in a call calculating the select_related tables. Thanks to aurelio for the report and original patch, and wogan for the updated patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-23 14:25:29 +00:00
Russell Keith-Magee 3fb57d47bd Fixed #13328 -- Ensured that querysets on models with callable defaults can be pickled. No, really this time. Thanks to Alex for his help brainstorming the solution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-21 16:34:33 +00:00
Russell Keith-Magee cb906e1593 Fixed #13366 -- Corrected the field __setstate__ method to avoid a race condition when initially importing models. Thanks to Brett Hoerner for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13005 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-20 14:39:46 +00:00
Russell Keith-Magee 2cd48bac7e Fixed #13358 -- Ensured that db_manager() can be used to override database routing on M2M, reverse FK and generic key queries. Thanks to Craig Kimerer for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12993 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-16 12:29:23 +00:00
Karen Tracey 29341aaffc Fixed #13348: Restored ability to load models from apps in eggs. Thanks Ramiro and metzen for pointers on how to find out if a module loaded from an egg has a particular submodule.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12982 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-15 18:44:51 +00:00
Russell Keith-Magee 442ee687df Fixed #13349 -- Ensure that raw queries evaluate the entire query if the backend doesn't support chunked reads. Thanks to Alex Gaynor for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-15 13:01:51 +00:00
Russell Keith-Magee 2faa3acb4b Fixed #13328 -- Added a __getstate__/__setstate__ pair to fields so that callable default values aren't pickled. Thanks to bkonkle for the report, and Vitaly Babiy for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-15 12:41:08 +00:00
Karen Tracey 48dd5f13a3 Fixed #13335: Adjusted the r12950 fix to properly handle import errors resulting from nested calls to load_app.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12972 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-14 19:10:27 +00:00
Russell Keith-Magee e93f56b174 Fixed #13227 -- Ensure that the query cache is flushed when a QuerySet is deepcopied, avoiding problems when an evaluated queryset is used as a subquery. Thanks to claudep for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-13 15:18:10 +00:00
Karen Tracey 55c31fbdef Fixed #11696: Changed app loading code so that it does not swallow import errors that used to be (prior to r10088) raised.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12950 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-12 12:39:18 +00:00
Russell Keith-Magee 040c18b17e Fixed #13309 -- Ensure that delete() deletes everything it should delete(). Thanks to craig.kimerer@gmail.com for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-09 13:24:13 +00:00
Russell Keith-Magee 82efb48403 Fixed #12328 -- Corrected the handling of subqueries with ordering and slicing, especially when used in delete subqueries. Thanks to Walter Doekes for the report.
This fixes a feature that isn't available under MySQL and Oracle (Refs #10099).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12912 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-04 17:05:43 +00:00
Russell Keith-Magee f92d73fbd4 Fixed #12247 -- Corrected the way update queries are processed when the update only refers to attributes on a base class. Thanks to jsmullyan for the report, and matiasb for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-03 11:45:31 +00:00
Russell Keith-Magee 5e5203c7d7 Fixed #11956 -- Modified the handling of m2m relationships between subclasses. Thanks to nidi for the report, and astoneman for the suggestion on how to fix the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-02 15:44:48 +00:00
Russell Keith-Magee 8f8743a69e Fixed #12429 -- Modified RawQuery to provide some facilities required by Oracle. Thanks to Karen Tracey for the testing help.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12907 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-02 14:44:16 +00:00
Russell Keith-Magee f7cf58ac0e Fixed #12429 -- Ensure that raw queries call resolve_columns if the backend defines it. This ensures (as much as possible) that the model values returned by a raw query match that in normal queries. Thanks to Ian Kelly for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12904 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-01 16:48:16 +00:00
Russell Keith-Magee 4e5c20b78b Fixed #11916 -- Corrected handling of aggregation when there is a subquery provided in an extra(select=) clause. Thanks to jaklaassen@gmail.com for the report, and to tobias, paluh, Karen Tracey and Ian Kelly for their work on the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-31 13:43:22 +00:00
Russell Keith-Magee a75dc3406f Fixed #13250 -- Corrected a problem with the use of routing rules on the create() call on a Foreign Key. Thanks to chris@xlevus.net for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12895 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-31 12:33:10 +00:00
Russell Keith-Magee 273a002544 Fixed #13087 -- Modified m2m signals to provide greater flexibility over exactly when notifications are delivered.
This is a BACKWARDS INCOMPATIBLE CHANGE for anyone using the signal names introduced in r12223.

 * If you were listening to "add", you should now listen to "post_add".
 * If you were listening to "remove", you should now listen to "post_remove".
 * If you were listening to "clear", you should now listen to "pre_clear".

You may also want to examine your code to see whether the "pre_add", "pre_remove" or "post_clear" would be better suited to your application.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-30 11:54:56 +00:00
Russell Keith-Magee ad5afd6ed2 Fixed #12769, #12924 -- Corrected the pickling of curried and lazy objects, which was preventing queries with translated or related fields from being pickled. And lo, Alex Gaynor didst slayeth the dragon.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12866 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27 15:54:31 +00:00
Russell Keith-Magee b31b2d4da3 Fixed #13227 -- Modified ForeignKeys to fully honor the db_prep/prep separation introduced by multidb. This was required to ensure that model instances aren't deepcopied as a result of being involved in a filter clause. Thanks to claudep for the report, and Alex Gaynor for the help on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27 15:16:27 +00:00
Karen Tracey 9df71371c2 Fixed #12822: Don't copy the _aggregate_select_cache when cloning a query set,
as that can lead to incorrect SQL being generated for the query. Thanks to mat
for the report and test, tobias for the fix, and Alex for review.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12830 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-21 20:47:52 +00:00
Karen Tracey 10884ec2eb Fixed #12239, again: Refined the original fix to avoid the test errors introduced. Thanks pmclanahan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12821 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-20 20:01:06 +00:00
Karen Tracey 9150fb6b0c Fixed #12239: Fixed results of gte and lt queries when comparing floats to integer field values.
Thanks waverider, aroy, SmileyChris, and pmclanahan.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-20 17:56:22 +00:00
Russell Keith-Magee 3a5dae5ed3 Fixed #12851 -- Corrected the interaction of defer() with select_related(). Thanks to ruosteinen for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-20 15:37:26 +00:00
Russell Keith-Magee bfa080f402 Fixed #12937 -- Corrected the operation of select_related() when following an reverse relation on an inherited model. Thanks to subsume for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-20 15:02:59 +00:00
Russell Keith-Magee 9f6a82fafb Fixed #13156 -- Ensure that exists() queries are as fast as they can be. Thanks to Jerome Leclanche for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12810 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-20 10:37:57 +00:00
Karen Tracey 47a822207f Fixed #12881: Corrected handling of inherited unique constraints. Thanks for report fgaudin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-16 19:32:11 +00:00
Russell Keith-Magee 2d57300f52 Fixed #12953 -- Ensure that deletion cascades through generic relations. Also cleans up the special-casing of generic relations in the deleted object discovery process. Thanks to carljm for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-15 13:15:01 +00:00
Russell Keith-Magee 203d0f6048 Fixed #11891 -- Ensured that attributes of get_absolute_url are preserved through the metaclass. Thanks to nfg for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-12 14:36:39 +00:00
Russell Keith-Magee d312fa2a61 Fixed #12717 -- Corrected a problem with subqueries when using multidb routing. Thanks to Jeff Balogh for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12755 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-10 15:27:22 +00:00
James Bennett cccd106289 Forced blank=True for NullBooleanField to allow it to pass model validation with a value of None. Refs #13071.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-10 07:41:37 +00:00
Luke Plant bae921dcff Fixed #11940 - ModelForm evaluates callable default values on form class creation
Thanks to Harm Geerts for the report and initial patch.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-08 15:03:30 +00:00
Luke Plant 5e3a2e2f39 Fixed #12240 - select_related doesn't work correctly when mixing nullable and non-nullable keys
Thanks to embe for report and Alex for fix.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-08 12:47:16 +00:00
Russell Keith-Magee 18983f0ee7 Fixed #13003 -- Ensured that ._state.db is set correctly for select_related() queries. Thanks to Alex Gaynor for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-07 07:13:55 +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
Joseph Kocherhans 686dac03b7 Fixed #12913. Fields with choices now respect show_hidden_initial as a keyword argument to formfield. Thanks, semenov.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-07 01:50:58 +00:00
James Bennett 98aecaa999 Fixed #13034: Corrected default error message for IntegerField.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12685 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-06 11:11:55 +00:00
Russell Keith-Magee e12b3199d0 Fixed #6191, #11296 -- Modified the admin deletion confirmation page to use the same object collection scheme as the actual deletion. This ensures that all objects that may be deleted are actually deleted, and that cyclic display problems are avoided. Thanks to carljm for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-26 13:17:43 +00:00
Joseph Kocherhans ff963358d7 Fixed #12734. Deferred fields will now be properly converted to python when accessed. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-24 19:06:59 +00:00
Joseph Kocherhans 16fe73d918 Fixed #7190. Boolean fields now return bool values instead of 1 or 0. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-24 17:36:18 +00:00
Joseph Kocherhans 9f4bf525f8 Fixed #12546. Objects with a __len__ that returns 0 can now be serialized. Thanks, casobn for the report and Alex Gaynor for the patch and tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-24 15:54:03 +00:00
Joseph Kocherhans 1089bda546 Fixed #12152. DoesNotExist and MultipleObjectsReturned now subclass their parent model's exceptions. Thanks, mattmcc and Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12567 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-24 14:32:11 +00:00
Joseph Kocherhans c05de31d75 Fixed #12731. Fixed a bug with .raw() and inheritance. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 19:39:06 +00:00
Joseph Kocherhans 65b451ae3e Fixed #12819. Fixed a bug with caching values of nullable 1to1 fields. Thanks, s.angel@twidi.com for the initial patch, and Alex Gaynor for the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 19:24:27 +00:00
Joseph Kocherhans 7352238e16 Fixed a few more spots related to #11859. Thanks, cramm and Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 18:27:51 +00:00
Joseph Kocherhans 10b1871441 Fixed #12888. Fixed a typo in some related object error messages. Thanks, nessita.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12532 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 16:09:39 +00:00
Justin Bronn 5546430304 Fixed #12608 -- No longer return inconsistent results when using `values` and `values_list` in conjunction with `annotate`. Thanks, Charlie Leifer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 05:26:49 +00:00
Justin Bronn c4699b0b8a Fixed #12806 -- Added an implementation of `RawQuerySet.__getitem__`. Thanks, Bruno Renié.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 05:22:12 +00:00
Justin Bronn 6ed7bd5609 Fixed #12855 -- QuerySets with `extra` where parameters now combine correctly. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 04:39:39 +00:00
Russell Keith-Magee e6db084ac8 Fixed #11226 -- Corrected an validation edge case with m2m relations between two models with the same class name. Thanks to pkoch for the report, and to Ramiro Morales for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12489 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-22 14:04:13 +00:00
Karen Tracey bb6b9aa472 Fixed #11535: Corrected SQL generated for queries involving generic relations and ORed Q objects. Thanks to brianglass for report, tobias for fix and test, and Alex for review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-10 19:21:52 +00:00
Joseph Kocherhans 225c413b08 Fixed #12647. Allow unique_together checks be specified as lists as well as tuples. Thanks, Honza Král.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-10 00:49:33 +00:00
Joseph Kocherhans fbb42c31df Fixed #12667. Added optgroup validation support to model fields with choices. Thanks ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12374 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-02 00:41:28 +00:00
Karen Tracey 199cd0efca Fixed #12721: Ensured objects with generic relations that use non-integer object ID fields can be deleted on PostgreSQL. Thanks much carljm for patch and Russ for review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 17:58:22 +00:00
Russell Keith-Magee 58cd220f51 Fixed #7270 -- Added the ability to follow reverse OneToOneFields in select_related(). Thanks to George Vilches, Ben Davis, and Alex Gaynor for their work on various stages of this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27 13:30:29 +00:00
Russell Keith-Magee 1b3dc8ad9a Fixed #12540, #12541 -- Added database routers, allowing for configurable database use behavior in a multi-db setup, and improved error checking for cross-database joins.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-22 14:30:06 +00:00
Joseph Kocherhans acc095c333 Fixed #12582. Model validation on ForeignKeys now respects limit_choices_to. Thanks, Honza Král.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-21 03:26:14 +00:00
Joseph Kocherhans a2a5602b19 Fixed #12560. Changed validate_unique to stop checking null primary key values. Thanks, Honza Král.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-14 17:04:53 +00:00
Russell Keith-Magee 2b2db12032 Fixed #12386 -- Corrected the column names produced for autogenerated m2m tables when the related table is specified as a dot-separated string. Thanks to ldevesine for the report and simonb for the extra test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-14 14:55:36 +00:00
Russell Keith-Magee 6afd505b5b Fixed #5390 -- Added signals for m2m operations. Thanks to the many people (including, most recently, rvdrijst and frans) that have contributed to this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-13 11:07:16 +00:00
Luke Plant eb2cbb6db1 Fixed some bad indentation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12 14:26:17 +00:00
Joseph Kocherhans 2f9853b2dc Fixed #12512. Changed ModelForm to stop performing model validation on fields that are not part of the form. Thanks, Honza Kral and Ivan Sagalaev.
This reverts some admin and test changes from [12098] and also fixes #12507, #12520, #12552 and #12553.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12 02:29:45 +00:00
Adrian Holovaty 5ceed0a053 Changed a whole bunch of places to raise exception instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 18:36:20 +00:00
Adrian Holovaty 7c0326bcca Fixed #12537 -- Fixed error in Model.full_validate(). Thanks, gauss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 17:56:52 +00:00
Adrian Holovaty cf1b6845d4 Fixed #12142 -- EmptyQuerySet.update() no longer updates all rows in the database
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 17:53:19 +00:00
Adrian Holovaty 18723e6e24 Fixed #10015 -- PostgreSQL 8.3+ no longer barfs when passing an integer as a filter() value for a CharField or TextField. Thanks, carljm
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12150 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09 22:05:10 +00:00
Adrian Holovaty 2dd9a85819 Fixed #7235 -- EmptyQuerySet no longer raises and exception when it's filter()ed (along with some other QuerySet methods). Thanks, taylormarshall
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12147 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09 21:27:39 +00:00
Jannis Leidel bacfe3f3e8 Fixed #9638 - Added %(app_label)s to the related_name format string for abstract models.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09 20:03:52 +00:00
Jannis Leidel b7236b8576 Fixed #12059 - Let TimeField.to_python correctly return a datetime.time object when having a datetime object.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-09 20:02:41 +00:00
Joseph Kocherhans 33afa13af5 Fixed a call to .using() that didn't make it into one of the model-validation branch merges.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05 15:39:42 +00:00
Joseph Kocherhans 1e81e2f532 Fixed another instance like [12099]. Thanks again, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12100 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05 04:30:51 +00:00
Joseph Kocherhans 777da5bc73 Fixed a regression in validate_unique introduced in [12098]. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05 04:12:09 +00:00
Joseph Kocherhans 471596fc1a Merged soc2009/model-validation to trunk. Thanks, Honza!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05 03:56:19 +00:00
Russell Keith-Magee efbace6b7e Fixed #12433 -- Corrected a typo in the text of the exception raised by RawQuery. Thanks to bjunix for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-24 05:35:43 +00:00
Ian Kelly cdf5ad4217 Changes to get raw queries working on the oracle backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 21:05:15 +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
Russell Keith-Magee 3d00992d9f Fixed #11936 -- Removed deferred models from the list returned by the app_cache. Thanks to ryszard for the report, and clamothe for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 06:01:23 +00:00
Jacob Kaplan-Moss 20ad30713e Fixed #11863: added a `Model.objects.raw()` method for executing raw SQL queries and yield models.
See `docs/topics/db/raw.txt` for details.

Thanks to seanoc for getting the ball rolling, and to Russ for wrapping things up.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11921 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-20 02:46:58 +00:00
Luke Plant e4757ec7af Fixed #12258 - QuerySet.get() should clear ordering.
We only clear ordering when doing so cannot change the result returned by
the get() method i.e.  when the query does not already define limits.

Thanks to mattdennewitz@gmail.com for the report, and jdunck for the patch



git-svn-id: http://code.djangoproject.com/svn/django/trunk@11916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-19 15:02:46 +00:00
Luke Plant 7efd96844d Fixed #12251 - QuerySet.in_bulk() should accept set/frozenset
Thanks to emulbreh for patch.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@11915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-19 14:50:41 +00:00
Jacob Kaplan-Moss 574eafe4c0 Fixed #11753 - Q objects with callables no longer explode on Python 2.4. Thanks, Jeremy Dunck.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 22:06:41 +00:00
Karen Tracey 5bd63663a9 Fixed #399: Added big integer field. Thanks to Tomáš Kopeček for persistently maintaining a patch for this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 15:10:38 +00:00
Luke Plant b38e678dae Fixed #12389 - performance enhancement of get_models()
Thanks to Travis Cline for the patch, which gives about 35% speed increase
for the testsuite (with SQLite in-memory DB).



git-svn-id: http://code.djangoproject.com/svn/django/trunk@11883 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-16 21:25:00 +00:00
Karen Tracey 833df0afaa Fixed #12385: Made built-in field type descriptions in admindocs translatable again. Many thanks to Ramiro for the problem report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11878 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-16 18:13:34 +00:00
Karen Tracey 0986a4d2e1 Fixed #7977: Fixed admindocs to use docstrings instead of a static array to locate type information.
Thanks J. Clifford Dyer.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@11833 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-12 20:25:41 +00:00
Luke Plant eeb10d5f2c Optimised use of 'in' operator on QuerySet using an explicit __contains__ method.
Without this change, use of 'in' on a QuerySet resulted in ._result_cache
being fully populated, which sometimes is unnecessary work.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@11803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-09 16:07:21 +00:00
Russell Keith-Magee 660f9086f1 Fixed #12245 -- Corrected target app handling for auto-generated m2m models when the parent model isn't in the models module (or a subpackage thereof). Thanks to emulbreh for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11755 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-20 00:59:38 +00:00
Russell Keith-Magee 77755aa5a0 Fixed #12242 -- Corrected a problem with masking extra selects() in a DateQuerySet. Thanks to Alex Gaynor for his help debugging this one.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-19 04:35:53 +00:00
Russell Keith-Magee dd045aaab5 Fixed #12209 -- Made the through attribute on a m2m relation into a property to ensure that the fully resolved through model is always provdided. Thanks to dgouldin for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-13 12:34:41 +00:00
Russell Keith-Magee 632f12fba4 Fixed #12163 -- Corrected the unpickling of non-deferred models. Thanks to rfugger for the report and test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-11 13:06:18 +00:00
Russell Keith-Magee 70f9a4f6ce Fixed #12190 -- Corrected a regression in the ability to instantiate ForeignKeys outside of models. Thanks to jittat for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-10 15:21:12 +00:00
Russell Keith-Magee 7b63d3d3b4 Fixed #12168 -- Corrected the registration of m2m autocreated models when models.py is split into submodules. Thanks to Jens Diemer for the report and test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11724 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-05 11:57:28 +00:00
Russell Keith-Magee f9ead3fe42 Fixed #12143 -- Corrected the naming of the 'to' column in recursive m2m models. Thanks to knutin@gmail.com for the report, and Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-03 23:34:58 +00:00
Russell Keith-Magee dab3e97c1a Fixed #11795 -- Document (and slightly simplify) the use of inlines for m2m relations.
This is the first immediate benefit of m2m relations having an autogenerated model.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-03 15:02:16 +00:00
Russell Keith-Magee 585b7acaa3 Fixed #10109 -- Removed the use of raw SQL in many-to-many fields by introducing an autogenerated through model.
This is the first part of Alex Gaynor's GSoC project to add Multi-db support to Django.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-03 14:02:49 +00:00