Commit Graph

1266 Commits

Author SHA1 Message Date
Russell Keith-Magee 960d3172f6 [1.0.X] Fixed #9522 -- Modified handling of values in base serializer so that field subclasses can define their own value_to_string() method for serialization. Thanks to Alex Koshelev for the report and initial patch.
Merge of r10554 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-13 12:40:43 +00:00
Russell Keith-Magee 6be2d903f3 [1.0.X] Fixed #9804 -- Corrected the introspection of sequence names. This was causing problems when flushing tables that had many-to-many relations through an inherited table. Thanks to jdimov for the report.
Merge of r10552 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-13 07:16:44 +00:00
Russell Keith-Magee 2c6e3b30b3 [1.0.X] Fixed #10237 -- Corrected the handling of self-referential m2m fields when using multi-table inheritance. Thanks to Justin Lilly for the report and patch.
Merge of r10550 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10551 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-13 03:07:59 +00:00
Malcolm Tredinnick 1e0c34dd7f [1.0.X] Fixed #10692 -- Fixed DecimalField lookups for extreme values.
Backport of r10545 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12 05:34:07 +00:00
Malcolm Tredinnick f0c9bc5563 [1.0.X] Fixed #10675 -- Added unicode paragraph and line-sep handling to escapejs.
There were a couple of line breaking Unicode characters (\u2028 and
\u2029) that cause Javascript errors, at least in Firefox, if not
escaped. So now we do so. Based on a patch from rleland.

Backport of r10543 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12 04:57:50 +00:00
Malcolm Tredinnick 6771f4e348 [1.0.X] Fixed #10267 -- Correctly handle IRIs in HttpResponse.build_absolute_uri().
Backport of r10539 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12 03:54:49 +00:00
Malcolm Tredinnick 13475ed646 [1.0.X] Fixed #10369 -- Fixed auto-escaping inside "tran" and "blocktrans" tags.
Patch from Andrew Badr.

Backport of r10519 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 12:07:52 +00:00
Russell Keith-Magee b6bd5ddc33 [1.0.X] Fixed #10571 -- Ensured that unicode POST data is correctly encoded by the test client. Thanks to Rick Wagner for his help identifying and fixing this problem.
Merge of r10513 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 09:27:04 +00:00
Jacob Kaplan-Moss 06f379bd5c [1.0.X] Fixed #10753 -- Fixed regression in dispatcher after [10398]. Thanks for the patch and tests, minmax. Backport of r10497 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10503 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 21:40:38 +00:00
Jacob Kaplan-Moss 2ab40287bc [1.0.X] Fixed #9640, #10549: BooleanFields with choices, a default, and null=False now correctly doesn't generate a blank option. Backport of r10500 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 19:57:11 +00:00
Jacob Kaplan-Moss 7a283f790c [1.0.X] Converted model_fields regression tests into unittests. Backport of r10499 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 19:56:56 +00:00
Jacob Kaplan-Moss ca5b624b05 [1.0.X] Fixed #10774: accessing form media types in templates (i.e. ``{{ form.media.js }}``) now works. Thanks, tarequeh and Alex Gaynor. Backport of r10489 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10491 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 17:10:44 +00:00
Malcolm Tredinnick dd7198701a [1.0.X] Fixed #9315 -- Handle spaces in URL tag arguments.
Thanks Natalia Bidart and Matías Bordese for most of this patch.

Backport of r10462 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10463 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 04:49:00 +00:00
Malcolm Tredinnick 6c45765681 [1.0.X] Fixed #8515 -- Fixed validation of Polish REGON numbers.
Patch from Piotr Lewandowski.

Backport of r10460 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10461 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-10 01:13:29 +00:00
Jacob Kaplan-Moss 8c3d593b0f [1.0.X] Fixed #7944: date-based generic views no longer get confused with a numeric month format. Thanks to Justin Lilly and Alex Gaynor. Backport of r10457 and r10458 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-09 15:28:41 +00:00
Jacob Kaplan-Moss e013c78ef8 [1.0.X] Fixed the test from [10447] to not depend on `os.listdir()` ordering. I always forget about that one; thanks, buildbot. Backport of r10449 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 19:42:01 +00:00
Jacob Kaplan-Moss 136d8b2854 [1.0.X] Fixed #8422: FilePathField now respects required=False. Backport of r10447 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-08 18:55:06 +00:00
Jacob Kaplan-Moss 4f2259f539 [1.0.X] Added some tests to show that #9672 has been fixed ever since [10215]. Refs #9672. Backport of r10440 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 22:13:30 +00:00
Jacob Kaplan-Moss 866574a854 [1.0.X] Fixed #9957: feeds now respect time zone information provided by the pub date. Backport of r10435 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10436 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 21:21:17 +00:00
Jacob Kaplan-Moss 6951cece53 [1.0.X] Replaced a misplaced import from [10425].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10426 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 19:53:42 +00:00
Jacob Kaplan-Moss 0c85192ebe [1.0.X] Fixed #10585: comment redirects built from the `next` parameter now work correctly when `next` already contains a query string. Backport of r10424 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10425 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 19:50:42 +00:00
Russell Keith-Magee 3931829c6e [1.0.X] Fixed #10183 -- Corrected the handling of unicode in assertContains and assertNotContains. Thanks to trbs for the patch.
Merge of r10414 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10415 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 12:15:25 +00:00
Karen Tracey bb558539ad [1.0.X] Made a set of small test changes to avoid leaving temp files hanging around after running the test suite. First, fixed a couple of places where temp dirs were (or could be) created without later being deleted. Second, added a missing close() before unlink() since Windows raises an error on an attempt to remove an open file. Finally, in the file_uploads tests, avoided opening-by-name temporary files that we already have a descriptor for. Doing additional opens seems to run afoul of the Windows issue with deleting open files, so it generally works better to just seek back to 0 instead of calling open multiple times.
Backport/merge of r10406.  Also updated svnmerge metadata.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10407 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-05 21:45:07 +00:00
Jacob Kaplan-Moss 734a3ac767 [1.0.X] Fixed the test case from [10399] to be more robust against the order in which test cases are executed. Backport of r10402 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-05 17:54:40 +00:00
Jacob Kaplan-Moss 33173e98c1 [1.0.X] Fixed #10080: `call_command` now takes option defaults into account, sparing individual commands from any difference between `call_command` and being run from the shell. Thanks, Alex Koshelev. Backport of 10400 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10401 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-05 17:28:09 +00:00
Jacob Kaplan-Moss 35c30ee957 Fixed #9989: fixed a subtle edge case where removing signals could break. Thanks, ferringb. Backport of r10398 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-05 17:21:25 +00:00
Karen Tracey a9931e5655 [1.0.X] Fixed the test added for #9005 to use the e.args[0] instead of e.message. Exceptions didn't have 'message' before Python 2.5, and it was deprecated as of Python 2.6. args[0] works without error or DeprecationWarning from Python 2.3 through 2.6.
r10394 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 19:48:26 +00:00
Karen Tracey 2d20e5265a [1.0.X] Fixed up the tests added for #9779 to run under Python 2.3, which doesn't have set.
Merge of the part of [10392] that applies to the 1.0.X branch.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10393 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 19:12:52 +00:00
Karen Tracey cfe9b6f642 [1.0.X] Replace test use of assertTrue with failUnless. No matter how many times we try, Python 2.3 still doesn't recognize assertTrue.
[10390] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 17:54:35 +00:00
Karen Tracey 055f9a0ebf [1.0.X] Fixed #10254: Changed the regex in get_valid_filename to allow unicode alphanumerics (thanks gulliver). Also updated the file_uploads test for this case to check the name after saving the uploaded file. As it was the test ensured that files with unicode characters in their names could be uploaded, but it wasn't actually ensuring that the unicode characters were preserved through save.
Backport of [10388]


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 17:42:43 +00:00
Jacob Kaplan-Moss fd8965198f [1.0.X] Fixed #9991: correctly introspect PostgreSQL 'real' types. Backport of r10379 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10380 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-03 20:53:50 +00:00
Jacob Kaplan-Moss fbffc2e943 [1.0.X] Fixed #10522: accept tuples in `generic_inlineformset_factor(exclude)`. Thanks, mk. Backport of r10375 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10376 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-03 20:04:39 +00:00
Jacob Kaplan-Moss 9907495b3c [1.0.X] Fixed #9546: GenericRelations inherited from base models no longer query using the wrong content type. Backport of r10373 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10374 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-03 19:56:30 +00:00
Jacob Kaplan-Moss 4257feffe8 [1.0.X] Fixed #9520: make the date filter fail silently for non-date values. Thanks, Andrew Badr and Eric Holscher. Backport of r10365 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 05:22:17 +00:00
Jacob Kaplan-Moss 38aeee4839 [1.0.X] Added tests for database introspection. Refs #9779. Backport r10362 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 04:34:42 +00:00
Jacob Kaplan-Moss c51722373b [1.0.X] Fixed the test in [10351] to work reguardless of the test settings. Backport of r10355 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10356 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 01:41:56 +00:00
Jacob Kaplan-Moss a080fcd1a6 [1.0.X] Fixed #9005: don't wig out when reversing a URL if SETTINGS_MODULE isn't set. While I was there, I fixed #10599 by re-raising the original error message, which is almost always a better idea. Thanks, Eric. Backport of r10350 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10351 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 23:09:45 +00:00
Joseph Kocherhans f58df036bd [1.0.x] Backport of r10348 from trunk, plus missing tests that should have been in r10286.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 22:35:41 +00:00
Jacob Kaplan-Moss eb24c7fd0c [1.0.X] Fixed #9969: choices with options groups (added in [7977]) now work correctly in the admin with list_display and list_filter. Thanks, ramiro. Backport of r10318 from trunk; thanks, cramm.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 21:17:54 +00:00
Jacob Kaplan-Moss e047110657 [1.0.X] Fixed #10016: the cache middleware no longer vomits when handed long URLs. Thanks, Matt Croydon. Backport of r10335 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 18:20:53 +00:00
Jacob Kaplan-Moss 6efe30672d [1.0.X] Fixed #9474: user_passes_test may now be applied multiple times. Backport of r10328 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10329 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 16:18:25 +00:00
Jacob Kaplan-Moss 7cbbd782e1 [1.0.X] Fixed #9473: FormWizard now works with NullBooleanFields. As a bonus, we now have the beginnings of a test suite for FormWizard. Thanks, Keith Bussell. Backport of r10316 and r10319 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 15:07:31 +00:00
Jacob Kaplan-Moss 906f55bf09 [1.0.X] Fixed #7510: the ModelAdmin now uses `self.queryset` instead of the default manager. Thanks, Alex Gaynor. Backport of r10314 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 15:07:13 +00:00
Jacob Kaplan-Moss 377cc9c850 [1.0.X] Fixed #10513: floatformat now works with floatish things, not just real floats. Thanks, Alex. Backport of [10278] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10299 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 22:04:15 +00:00
Jacob Kaplan-Moss 4a3139d63e [1.0.X] Fixed #8847, #10370: added some missing methods to MultiValueDict after [8399]. Thanks, James Turk and rfk. Backport of r10241 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 22:02:37 +00:00
Jacob Kaplan-Moss 795697dc22 [1.0.X] Fixed #8746: Check data in raw_id_fields more closely. Thanks, dgouldin
Backport of r10233 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10294 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 21:48:29 +00:00
Jacob Kaplan-Moss 67a5880162 [1.0.X] Fixed #10413: RelatedManager.add no longer fails silenty when trying to add an object of the wrong type. Thanks, dgouldin.
Backport of r10226 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 21:42:47 +00:00
Jacob Kaplan-Moss 7475092c9f [1.0.X] Fixed #10157: correctly set the related objects pk when assigning a reverse OneToOne. Thanks, dgouldin.
Backport of r10224 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 21:15:55 +00:00
Joseph Kocherhans 00087ef006 [1.0.X] Fixed #9863. A ForeignKey with editable=False to the parent in an inline no longer raises an exception. Thanks to keithb for the test case and Alex Gaynor for the patch. Backport of r10239 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10287 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 20:39:54 +00:00
Joseph Kocherhans 1e0acd537b [1.0.X] Forms in model formsets and inline formsets can now be deleted even if they don't validate. Related to #9587. Backport of r10283 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 20:30:05 +00:00
Jacob Kaplan-Moss 606c5a7e7e [1.0.X] Fixed #10184: QueryDicts with multiple values can now be safely pickled. Thanks, Alex Gaynor.
Backport of [10240] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10279 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 19:34:08 +00:00
Gary Wilson Jr b3b541b68e [1.0.X]: Fixed #10553 -- Corrected several uses of `URLconf` in documentation and comments, according to the Django style guide. Based on patch from rduffield.
Backport of r10256 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10257 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 16:09:22 +00:00
Gary Wilson Jr 955ec63c5e [1.0.X]: Fixed #10667 -- Added missing sys import.
Backport of r10244 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 07:25:09 +00:00
Gary Wilson Jr 9bbf94112f [1.0.X]: Fixed #9978 -- Fixed a KeyError exception that was being raised when using the logout method on the test client on an unauthenticated user, based on patch from ericholscher.
Backport of r10228 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 23:20:10 +00:00
Joseph Kocherhans 22ac97b17c [1.0.X] Fixed #10149. FileFields? in a form now validate max_length. Based on a patch by Massimo Scamarcia. Backport of r10227 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:56:05 +00:00
Joseph Kocherhans f7e52d449a [1.0.X] Fixed #9587. Formset.is_valid() now returns True if an invalid form is marked for deletion. Backport of r10206 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10219 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:03:20 +00:00
Gary Wilson Jr 546d764a36 [1.0.X]: Fixed #9065 -- Fixed the `timesince` and `timeuntil` template tags to work when both values involved are date objects, thanks to morty and mboersma for the patch.
Backport of r10215 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 21:35:09 +00:00
Gary Wilson Jr 487a7fdcce [1.0.X]: Fixed #10094 -- Fixed the `include` and `extends` template tags to work with filenames with spaces, patch from mcroydon.
Backport of r10211 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10212 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 20:33:42 +00:00
Gary Wilson Jr 54d6fe97e9 [1.0.X]: Fixed #8462 -- Made `length` and `length_is` template filters fail silently when given a value that has undefined length and added tests for both filters. Based on patch from marcelor, rob, and SmileyChris.
Backport of r10193 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 16:48:24 +00:00
Gary Wilson Jr 4a5a21d10c [1.0.X]: Made the template tests error output a bit more pretty.
Backport of r10191 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 16:08:57 +00:00
Gary Wilson Jr ae5f451741 [1.0.X]: Removed an inadvertent raise statement added in [8777] and added the printing of tracebacks for template tests that raise an unhandled exception.
Backport of r10183 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-29 23:40:04 +00:00
Russell Keith-Magee d9eb87adae [1.0.X] Fixed #10589 -- Removed duplicated model definition in null_fk_ordering regression test. Thanks to Julien Phalip for the report.
Merge of r10143 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 11:50:08 +00:00
Malcolm Tredinnick 2fba099779 [1.0.X] Fixed #9926 -- Fixes for some select_related() situations.
Using select_related(...) across a nullable relation to a multi-table
model inheritance situation no longer excludes results. Thanks to AdamG
for a test demonstrating part of the problem.

Backport of r10136 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 05:54:35 +00:00
Ian Kelly 2b098e64e0 [1.0.X] Added an import that should have been included in [10126].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 22:14:00 +00:00
Ian Kelly 7499416d0d [1.0.X] Fixed a false failure in the test suite when running Oracle. Backport of [10125] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10126 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 22:11:07 +00:00
Malcolm Tredinnick ebfe7faaa3 [1.0.X] Fixed #2698 -- Fixed deleting in the presence of custom managers.
A custom manager on a related object that filtered away objects would prevent
those objects being deleted via the relation. This is now fixed.

Backport of r10104 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-20 22:14:31 +00:00
Russell Keith-Magee f781205859 [1.0.X] Corrected a problem with the database cache backend, and refactored the cache test suite to ensure that all the backends are actually tested.
Partial merge of r10031 and r10071 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18 12:28:53 +00:00
Malcolm Tredinnick 39c450cc6d Fixed #10526 -- More fixes when specifying installed apps using "foo.*".
This adds a case that was missed in r9925: underscore handling.

Backport of r10078 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10079 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18 01:08:34 +00:00
Malcolm Tredinnick 97321c7645 [1.0.X] Use plain model.Manager, or suitable proxy, for model saving.
We can't use the default manager in Model.save_base(), since we need to
retrieve existing objects which might be filtered out by that manager. We now
always use a plain Manager instance at that point (or something that can
replace it, such as a GeoManager), making all existing rows in the
database visible to the saving code.

The logic for detecting a "suitable replacement" plain base is the same as for
related fields: if the use_for_related_fields is set on the manager subclass,
we can use it. The general requirement here is that we want a base class that
returns the appropriate QuerySet subclass, but does not restrict the rows
returned.

Fixed #8990, #9527.

Refs #2698 (which is not fixed by this change, but it's the first part of a
larger change to fix that bug.)

Backport of r10056 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10059 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-15 03:45:32 +00:00
Ian Kelly 0ced9f68f3 [1.0.X] Fixed #10238: coerce TextField values to unicode in the oracle backend. Backport of [10049] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-13 19:58:56 +00:00
Ian Kelly 75cc96bc6f [1.0.X] Backport of [10024] from trunk. Refs #10443: Added Oracle to the #10443 regression test exemption, since we don't yet support it.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 22:50:37 +00:00
Russell Keith-Magee ee0320f634 [1.0.X] Fixed #10271, #10281 -- Fixed the handling multiple inline models that share a common base class and have the link to the inline parent on the base class. Includes modifications that allow the equivalent handling for GenericFields. Thanks to Idan Gazit, Antti Kaihola (akaihola), and Alex Gaynor for their work on this patch.
Backport of r10017 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 12:08:17 +00:00
Malcolm Tredinnick ea350187a5 [1.0.X] Fixed #10439 -- Fixed a subtle test failure caused by r9995.
Thanks to Ramiro Morales for debugging what was going on here.

Backport of r10015 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 05:55:55 +00:00
Malcolm Tredinnick c545e88b81 [1.0.X] Fixed #10443 -- Fixed model attribute updating after r10004.
Adding a get_db_prep_save() call to the UpdateQuery code path meant it
was being called twice if you updated an existing model attribute. This
change removes that double call and also makes TimeField.to_python() a
little more robust for the benefit of the Oracle backend (just in case).

Backport of r10013 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10014 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10 05:26:40 +00:00
Malcolm Tredinnick 055c01103d [1.0.x] Fixed #9508 -- Added an appropriate FileField.__hash__ implementation.
Required because we declare a custom __eq__ method.

Backport of r9997 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 10:01:59 +00:00
Malcolm Tredinnick 7dcf651bc5 [1.0.X] Fixed #9323 -- Allow glob loading in INSTALLED_APPS to handle digits in names.
Patch from carljm.

Backport of r9994 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:41:37 +00:00
Malcolm Tredinnick fd5d0cdebb [1.0.X] Fixed #10432 -- Handle all kinds of iterators in queryset filters.
Only consumes the iterators once and works with Python 2.3.

Backport of r9986 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 03:37:47 +00:00
Malcolm Tredinnick 84b890b66e [1.0.X] Fixed #9649 -- Better error handling in model creation.
Previously, you could explicitly assign None to a non-null ForeignKey
(or other) field when creating the model (Child(parent=None), etc). We
now throw an exception when you do that, which matches the behaviour
when you assign None to the attribute after creation.

Thanks to ales.zoulek@gmail.com and ondrej.kohout@gmail.com for some
analysis of this problem.

Backport of r9983 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9984 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 04:53:33 +00:00
Malcolm Tredinnick 31e059c9b3 [1.0.X] Improved table join handling for comparisons against NULL.
This fixes a broad class of bugs involving filters that look for missing
related models and fields. Most of them don't seem to have been reported
(the added tests cover the root cause). The exception is that this has
also fixed #9968.

Backport of r9979 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06 02:09:59 +00:00
Malcolm Tredinnick 182301c8df [1.0.X] Fixed #10406 -- Fixed some problems with model inheritance and pk fields.
Manually specifying both a OneToOneField(parent_link=True) and separate a
primary key field was causing invalid SQL to be generated. Thanks to Ramiro
Morales for some analysis on this one.

Backport of r9971 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 07:24:30 +00:00
Malcolm Tredinnick dce458cde2 [1.0.X] Fixed #10251 -- Fixed model inheritance when there's also an explicit pk field.
Backport of r9970 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9972 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 07:23:18 +00:00
Malcolm Tredinnick b57d86f226 [1.0.X] Changed the row count value returned from update queries in some cases.
If an update only affected an ancestor model (not the child), we were
returning 0 for the number of rows updated. This could have been
misleading if the value is used to detect an update occuring. So we now
return the rowcount from the first non-trivial query that is executed
(if any). Still a slight compromise, but better than what we had.

Backport of r9966 from trunk (turns out this *is* a bugfix, since the returned
rowcount is used in Model.save(force_update=True)).

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 05:40:22 +00:00
Malcolm Tredinnick f1c9080984 [1.0.X] Fixed #10362 -- An update() that only affects a parent model no longer crashes.
This includes a fairly large refactor of the update() query path (and
the initial portions of constructing the SQL for any query). The
previous code appears to have been only working more or less by accident
and was very fragile.

Backport of r9967 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04 05:35:10 +00:00
Malcolm Tredinnick 0249177836 [1.0.X] Removed a test that was accidentally merged as part of r9927.
This was testing a feature that doesn't exist in the 1.0.X branch.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9948 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02 05:19:51 +00:00
Malcolm Tredinnick a899f7c662 [1.0.X] Fixed a misnamed test that was inadvertently hiding an earlier one.
Backport of r9929 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 07:19:55 +00:00
Malcolm Tredinnick 016f12a2c2 [1.0.X] Fixed insert/update handling when no database interaction is required.
Fixed #10205 as part of this.

Backport of r9926 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 01:59:18 +00:00
Malcolm Tredinnick 283c89e4c6 [1.0.X] Fixed #10202 -- Fixed another couple of slicing edge-cases with querysets.
Patch from Alex Gaynor and Ramiro Morales.

Backport of r9924 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9925 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01 01:35:36 +00:00
Malcolm Tredinnick 106bd0f49e [1.0.X] Fixed #10028 -- Fixed a problem when ordering by related models.
Some results were inadvertently being excluded if we were ordering across a
nullable relation which itself ordering by a non-nullable relation.

Backport of r9916 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-28 03:02:52 +00:00
Karen Tracey c9a63889f6 [1.0.X] Fixed #10347 -- Fixed incorrect AttributeError raised when attempting to access a FileField without an instance. Thanks for the report and patch dc.
[9902] from trunk.  Also updated svnmerge metadata; all trunk changesets have either been merged or blocked.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-24 17:28:33 +00:00
Jacob Kaplan-Moss 734376f947 [1.0.X] Fixed #9214: EmailMessage now respects the From header instead of blindly using from_email. Thanks, Tai Lee.
Backport of r9842 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-24 17:02:03 +00:00
Brian Rosner 93b3f89c31 [1.0.X] Fixed #10274 -- Fixed an embarrassing mistake in BaseGenericInlineFormSet.get_queryset. Thanks Zak Johnson for the report and akaihola for the patch.
Backport of r9886 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 04:31:29 +00:00
Russell Keith-Magee c2807db683 [1.0.X] Fixed #10256 -- Corrected the interaction of extra(select=) with values() and values_list() where an explicit list of columns is requested.
Merge of r9837 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-22 11:18:19 +00:00
Brian Rosner 5db8dc3573 [1.0.X] Fixed #5903 -- DecimalField.get_default() now correctly returns a Decimal object when the model instance was not retrieved from the database. Thanks Justin Driscoll and pigletto.
Backport of r9823 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-11 20:14:24 +00:00
Karen Tracey 962f0dbd77 Fixed #10075: Allowed saving of inline-edited models that use multi-table inheritance.
r9809 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-03 14:24:06 +00:00
Karen Tracey 47ed900b41 [1.0.X] Fixed #10103: Testcase fix for Jython compatibility. Thanks for report and patch leosoto.
r9782 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-23 05:00:09 +00:00
Karen Tracey 709476ae05 [1.0.X] Fixed #10069 -- Fixed the model form unique validation code to not proceed with using, for example, RelatedObjects returned by get_field_by_name as though they were model Fields.
r9777 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-19 19:43:01 +00:00
Karen Tracey 5ce4031a61 [1.0.X] Corrected code in serializers_regress testcase so that, in the case where an exception has been raised, rollback is called before attempting to leave transaction management. With the old code the original exception (IntegrityError on InnoDB) was getting hidden by a transaction management error resulting from attempting to leave transaction management with a pending commit/rollback.
r9773 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-18 22:09:56 +00:00
Matt Boersma f0e35e1bbe [1.0.X] Fixed #5543: callproc() and friends now work with Oracle and our FormatStylePlaceholderCursor.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9768 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 22:24:45 +00:00
Malcolm Tredinnick cc76b89c59 [1.0.X] Fixed #9985 -- qs.values_list(...).values(...) was constructing incorrect SQL.
Backport of r9717 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08 05:51:15 +00:00
Russell Keith-Magee f2986d89b9 [1.0.X] Fixed #9942 -- Added a to_python handler for FloatField to ensure correct typing of deserialized data before saving. Underlying problem is analogous to #8298, fixed in [8515]. Thanks to David Larlet <larlet@gmail.com> for the report and fix.
Backport of r9695 and r9696 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-03 04:59:05 +00:00