Commit Graph

427 Commits

Author SHA1 Message Date
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 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
Brian Rosner e58c75fbdf Restored pre-r10062 behavior allowing None from formfield_callback to exclude itself from the form
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-31 07:43:52 +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
Jannis Leidel aba95dcc0b Fixed #13023 - Removed ambiguity with regard to the max_num option of formsets and as a result of admin inlines. Thanks to Gabriel Hurley for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-27 23:03:56 +00:00
Russell Keith-Magee f13014b7e2 Modified the delete test to clean up after itself properly, so that the proxy_model_inheritance test can run without requiring manual confirmation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-25 17:31:25 +00:00
Russell Keith-Magee ef8d351cdf Fixed #12286 -- Modified the test case added in r12828 so that it passes under Postgres.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12846 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-25 13:14:01 +00:00
Russell Keith-Magee 985e4c8dfe Fixed #13171 -- Corrected the field_subclassing unit test. Thanks to Gabriel Hurley for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12838 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-23 14:11:41 +00:00
Karen Tracey 72ea8fc4eb Refs: #12286 -- Add a test to verify that a proxied model's table is created in
a situation where it did not used to be.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-21 20:29:11 +00:00
Karen Tracey 7471dab660 Fixed #13138: Ensure required=False on a model form field overrides
blank=False on the underlying model field during model form clean, 
in order to maintain backward compatibility. Thanks to saxon75 for 
the report.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12802 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-18 02:03:07 +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 d8c9d21c33 Added a transaction rollback needed to clean up after the test introduced by r12764.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12788 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-15 12:58:21 +00:00
Karen Tracey c10b227b69 Fixed #13107: Adjusted decimal_places validation to accept 0 as a valid value. Thanks to loewis for report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-13 22:11:48 +00:00
Russell Keith-Magee 75c8c1de9a Fixed #12404 -- Improved model validation for CharField and DecimalField. Thanks to tiliv for the report, josh for the patch, and Leo for the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12768 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-12 15:22:05 +00:00
Russell Keith-Magee ef0be292a6 Fixed #11900 -- Corrected an edge case of transaction handling in the commit_on_success decorator. Thanks to guettli for the report, and Gabriel Hurley for the initial test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-12 14:10:01 +00:00
Karen Tracey 079457ff01 Fixed #11702: Catch to_field specifying a non-unique target in validation. Thanks marcosmoyano.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-10 15:44:43 +00:00
Russell Keith-Magee ca81ad4f9d Fixed #13055 -- Cleaned up the implementation of transaction decorators to provide a consistent external facing API. Thanks to olb@nebkha.net for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-10 13:13:57 +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
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
Karen Tracey 0a0748a7d6 Fixed the files test to not care whether the names are reported as bytestrings or unicode. Refs #12898.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-03 13:40:52 +00:00
Karen Tracey 9fab1467c7 Removed more stray tabs in Python files.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12616 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-27 16:30:27 +00:00
Joseph Kocherhans e488c1dc0d Fixed #12901. Again. Model validation will not be performed on excluded fields that were overridden in the form. Thanks, ammarr.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-25 17:18:27 +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 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
Jacob Kaplan-Moss d30ff77602 Fixed an unspecified ordering in the expression tests that could lead to a heisenbug.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 23:02:10 +00:00
Jacob Kaplan-Moss 5366aa96fe Fixed #10258: handle duplicate file names better.
Instead of just continually appending "_" to duplicate file names, Django's
default storage now appends `_1`, `_2`, `_3`, etc.

Thanks to ianschenck and Thilo.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 22:39:22 +00:00
Joseph Kocherhans 43b47a87d3 Fixed #12948. Removed a test dependency on the formatting of Decimals. Thanks, coleifer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12551 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 21:58:58 +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
Justin Bronn 7ca3e8fecf Updated patch applied in r12504. Refs #12806.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23 06:04:06 +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
Joseph Kocherhans eb0751a4c0 Fixed #12901. Exclude overridden form fields from model field validation. Thanks, Honza Král.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-22 23:06:09 +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
Jacob Kaplan-Moss 7578981626 Fixed #6054: work around PIL's installation brokeness by detecting either of the two ways it can end up being installed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-14 18:28:28 +00:00
Russell Keith-Magee 03924929ba Fixed #12524 -- Clarified handling of pre-1000AD dates in datetime_safe (and thus, the serializers). Patch includes moving the datetime_safe tests into the utils regressiontests module. Thanks to gsf for the report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12423 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-13 14:02:32 +00:00
Russell Keith-Magee 79857802b8 Fixed #12011 -- Modified the test client to preserve the request scheme on a redirect. Thanks to tgardner for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12419 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-13 12:01:14 +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
Luke Plant 4bff194633 Fixed #12804 - regression with decorating admin views.
This is a BACKWARDS INCOMPATIBLE change, because it removes the flawed
'auto_adapt_to_methods' decorator, and replaces it with 'method_decorator'
which must be applied manually when necessary, as described in the 1.2
release notes.

For users of 1.1 and 1.0, this affects the decorators:

 * login_required
 * permission_required
 * user_passes_test

For those following trunk, this also affects:

 * csrf_protect
 * anything created with decorator_from_middleware 

If a decorator does not depend on the signature of the function it is
supposed to decorate (for example if it only does post-processing of the
result), it will not be affected.
 



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-09 15:02:39 +00:00
Jannis Leidel 9555f2be9d Fixed #12692 - Properly handle the extra clause of admin inline formsets. Also fixes #12703, second error.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-01 14:14:56 +00:00
Karen Tracey 33b1036f6f Tweaked the validation test models to avoid tripping over the fact that Oracle doesn't like columns named 'number'.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 18:38:28 +00:00
Russell Keith-Magee 14116bc53e Fixed #12672 -- Added the ability to configure which applications are available on which database.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12290 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-25 12:23:30 +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 86f283d4ca Fixed #12590. Changed an expression in the validators tests to work correctly with python 2.4. Thanks, ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12270 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-21 03:02:13 +00:00
Ian Kelly fb5f8d7b14 Fixed an Oracle test failure introduced in [12226].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12264 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-19 18:09:03 +00:00
Russell Keith-Magee e2d094b8fb Fixed #12640 -- Corrected a regression in test suite construction order introduced by #12255. Also updated the docs to reflect what the test code has always done. Thanks to Ramiro Morales for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-19 01:14:02 +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
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 9bb1fa7251 Fixed #9223 -- Added support for declarative widgets to ModelForm. I declare thanks to isagalaev.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 19:23:42 +00:00