1536 Commits

Author SHA1 Message Date
Justin Bronn
864361aabd [1.2.X] Fixed #13390 -- SplitDateTimeWidget now recognizes when it's no longer required. Thanks vaxXxa for bug report and patch.
Backport of r13753 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13754 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11 21:28:00 +00:00
Justin Bronn
e4bd5e8a2d [1.2.X] Fixed #13149 -- The admin ForeignKeyRawIdWidget now properly handles non-integer values. Thanks, Chris Adams.
Backport of r13751 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11 18:38:24 +00:00
Malcolm Tredinnick
f4ebd701f2 [1.2.X] Adjust AdminDocTests to run after r13728. Also match comments to tests and add test that was there in comment form only.Refs #3695.
Backport of r13737 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11 17:55:08 +00:00
Malcolm Tredinnick
4eb78b89ce [1.2.X] Improved unicode-type, ASCII-convertible header handling in
HttpResponse.

Fixed #8765. Thanks to SmileyChris and semenov for working on this one.

Backport of r13740 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11 03:25:44 +00:00
Justin Bronn
ff0cb11c1b [1.2.X] Fixed #13599 -- No longer embed hidden <td> elements in ChangeList that cause improper rendering when list_editable is enabled; refactored admin_changelist tests. Thanks, skevy for bug report and patch.
Backport of r13744 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13745 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11 03:04:28 +00:00
Luke Plant
260eff5684 [1.2.X] Fixed a test so that it actually tests what it's supposed to test.
Previously it passed whether or not the view was 'csrf_exempt'ed.

Backport of [13735] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 23:58:52 +00:00
Luke Plant
890b0b6234 [1.2.X] Fixed #14235 - UnicodeDecodeError in CSRF middleware
Thanks to jbg for the report.
  
This changeset essentially backs out [13698] in favour of a method that
sanitizes the token rather than escaping it.

Backport of [13732] from trunk.




git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 23:11:24 +00:00
Justin Bronn
43988e9835 [1.2.X] Fixed #13095 -- formfield_callback keyword argument is now more sane and works with widgets defined in ModelForm.Meta.widgets. Thanks, hvdklauw for bug report, vung for initial patch, and carljm for review. Backport of r13730 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 22:54:52 +00:00
Karen Tracey
aec5cbc370 [1.2.X] Fixed #13799, a test failure on Postgres. Thanks, Alex.
r13400 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13727 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 20:59:36 +00:00
Luke Plant
ec8d04cffe [1.2.X] Fixed #11158 - get_image_dimensions very slow/incorrect after 1 call
Thanks to kua for the report, and to kua, SmileyChris and SAn for the patch

Backport of [13715] from trunk


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13716 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 18:49:45 +00:00
Karen Tracey
13f1192911 [1.2.X] Fixed #14246: Modified aggregation_regress tests so that they will pass on a variety (sqlite, Postgres, MySQL/MyISAM) of DBs.
r13712 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 18:11:25 +00:00
Karen Tracey
1b0084e2a0 [1.2.X] Fixed some of the problems with aggregation_regress tests on higher levles of Postgres. Refs #14246.
r13709 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 17:08:14 +00:00
Luke Plant
ec4d6bb21d [1.2.X] Fixed #14247 - 'forms' test failure in 1.2.X
Thanks to ramiro/pmclanaham for the report and analysis.



git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 13:17:38 +00:00
James Bennett
7f84657b6b [1.2.X] Patch CSRF-protection system to deal with reported security issue. Announcement and details to follow. Backport of [13698] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-09 00:36:08 +00:00
Luke Plant
a04398eb1b [1.2.X] Fixed #13081 - Admin actions lose get-parameters in changelist view
Thanks to joh for report and to SmileyChris for patch.

Backport of [13696] from trunk


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-07 20:59:28 +00:00
Luke Plant
79d9206711 [1.2.X] Fixed #13414 - QuerySet API ref wrong sql equivalent in __year lookup example
Thanks to idle for report and patch

Backport of [13690] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13693 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-07 20:45:48 +00:00
Russell Keith-Magee
7a1b694189 [1.2.X] Fixed #14199 -- Added a missing table creation statement in the db cache backend cull implementation, and added tests for cache culling. Thanks to Tim for the report.
Backport of r13678 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-31 00:45:35 +00:00
Russell Keith-Magee
62355d8253 [1.2.X] Fixed #13798 -- Added connection argument to the connection_created signal. Thanks to liangent for the report, and Alex Gaynor for the patch.
Backport of r13672 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13674 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-30 13:25:22 +00:00
Russell Keith-Magee
0ed363dd1a [1.2.X] Fixed #14159 -- Corrected more potential uses of relative paths in tests. Thanks to Alex Gaynor for the patch.
Backport of r13636 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-24 02:27:22 +00:00
Russell Keith-Magee
49c5c07568 [1.2.X] Fixed #13140 -- Ensure that request headers are preserved through redirect chains in the test client. Thanks to David Novakovic for the report.
Backport of r13620 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-21 03:02:47 +00:00
Russell Keith-Magee
5c6fe321fe [1.2.X] Fixed #14148 -- Ensure the admin_script tests always use an absolute path; PyPy (and sometimes CPython) return relative paths for __file__. Thanks to Alex Gaynor for the report and patch.
Backport of r13618 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-21 02:56:05 +00:00
Russell Keith-Magee
c3b13d8f03 [1.2.X] Fixed #13895 -- Refactored aggregation_regress doctests. Thanks to Alex Gaynor for the patch.
Backport of r13614 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-20 14:29:57 +00:00
Russell Keith-Magee
3fc9d7e390 [1.2.X] Fixed #14068 -- Corrected error handling in loaddata when an allow_syncdb method is defined on the router. Thanks to Xavier Ordoquy for the report.
Backport of r13612 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13613 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-20 14:07:02 +00:00
Russell Keith-Magee
c9016c15a9 [1.2.X] Fixed #14123 -- Made AdminDocs tests optional, based on the availability of docutils. Thanks to PaulM for the original report, and Łukasz Rekucki for narrowing down the cause.
Backport of r13606 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-19 13:12:52 +00:00
Russell Keith-Magee
13953badb7 [1.2.X] Fixed #13796 -- Ensure that builtin tags and filters are included in admin documentation views.
Backport of r13588 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-14 13:43:13 +00:00
Russell Keith-Magee
8a006e1819 [1.2.X] Fixed #13679, #13231, #7287 -- Ensured that models that have ForeignKeys/ManyToManyField can use a a callable default that returns a model instance/queryset. #13679 was a regression in behavior; the other two tickets are pleasant side effects. Thanks to 3point2 for the report.
Backport of r13577 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-14 12:07:25 +00:00
Russell Keith-Magee
3ccc25b10c [1.2.X] Fixed #11159 -- Added mimetype detection to the test client for file uploads. Thanks to notanumber for the report and patch, and lomin for the test case.
Backport of r13517 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06 17:16:19 +00:00
Russell Keith-Magee
5d1dcfbfa5 [1.2.X] Added __init__.py file that was left out of [13505].
Backport of r13507 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06 16:25:19 +00:00
Russell Keith-Magee
e2fbe478bd [1.2.X] Fixed #13495 -- Refactored the localflavor test directory to provide the placeholder structure for other flavors. Thanks to chronos for the report and patch.
Backport of r13505 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06 16:19:23 +00:00
Russell Keith-Magee
c543f079ff [1.2.X] Fixed #14014 -- Ensure that the "save and add another" button for users actually does what it says. Thanks to Ramiro for the report.
Backport of r13503 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06 16:09:28 +00:00
Russell Keith-Magee
7930d8c477 [1.2.X] Fixed #14012 -- Corrected the handling of the create user popup dialog in the admin. Thanks to gk@lka.hu for the report, and Ramiro Morales for the patch.
Backport of r13051 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06 14:59:13 +00:00
Russell Keith-Magee
8419b092ae [1.2.X] Fixed #14027 -- Ensure that reverse() raises an exception when you try to reverse None. Thanks to Alex for the report and patch.
Backport of r13499 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06 14:39:24 +00:00
Russell Keith-Magee
908b91b69e [1.2.X] Fixed #13621 -- Corrected the handling of input formats on date/time form fields. Thanks to bufke for the report, zerok and jacmkno for their work on the patch, and Karen, Jannis and Alex for feedback.
Backport of r13484 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-05 12:53:27 +00:00
Russell Keith-Magee
aa59bc7404 [1.2.X] Fixed #13732 -- Fixed minor typo in docstring. Thanks to schinckel for the report.
Backport of r13483 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-05 12:52:59 +00:00
Russell Keith-Magee
d302a60c8d [1.2.X] Fixed #13613 -- Ensure that forms.URLField and forms.EmailField are used on a modelform. This ensures that fields are URL and Email fields are cleaned consistently when included on model forms. Thanks to amadison for the report.
Backport of r13475 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13476 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-05 04:00:56 +00:00
Jacob Kaplan-Moss
972a9c7e18 [1.2.X] Fixed #11377: the template join filter now correctly escapes the joiner, too.
Thanks, Stephen Kelly.

Backport of [13464] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13465 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-03 15:43:29 +00:00
Jacob Kaplan-Moss
4441f7b0f3 [1.2.X] Fixed #11376: added some extra tests for autoescaping subtleties.
Thanks, Stephen Kelly.

Backport of [13461] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13463 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-03 15:37:07 +00:00
Jacob Kaplan-Moss
c0040b4151 [1.2.X] Fixed #11288: added some tests for the handling of number-like variables in templates.
Thanks, Stephen Kelly.

Backport of [13460] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13462 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-03 15:37:00 +00:00
Russell Keith-Magee
2597f31ed4 Refs #8901 -- Reverted r13328 because the patch imposes a minimum version requirement of Postgres 8.0; we can't impose that on Django 1.2, so we need to wait until the 1.3 is branched before we can apply this change.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-10 11:45:29 +00:00
Luke Plant
ac8b7ff021 Fixed #13716 - the CSRF get_token function stopped working for views with csrf_view_exempt
This was a regression caused by the the CSRF changes in 1.2.

Thanks to edevil for the report.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@13336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-08 14:35:48 +00:00
Russell Keith-Magee
21a690fcfe Fixed #8901 -- Corrected the PostgreSQL sequence reset code when field identifiers exceed the maximum identifier length. Thanks to adam@zuerchertech.com for the report, and Matt Hoskins for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-07 15:47:19 +00:00
Russell Keith-Magee
1a6da249c3 Fixed #13700 -- Converted m2m_through_regress tests to unittests, removing another flush call. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-07 02:11:58 +00:00
Russell Keith-Magee
be63b3ca54 Fixed #13698 -- Removed trailing whitespace from regressiontests/utils/timesince. Officially, I'm doing this because trailing whitespace is bad, but apparently it also causes test failures for some people (for reasons we can't narrow down), so there's a double win.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-05 13:07:21 +00:00
Russell Keith-Magee
289f41921e Fixed #13697 -- Modified multiple_database test to avoid a failure observed under Python 2.6.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-05 06:37:52 +00:00
Russell Keith-Magee
45e5fb1ee2 Migrated multiple_database tests to use new stdout argument on management commands, rather than monkeypatching stdout.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-05 05:32:05 +00:00
Jacob Kaplan-Moss
3180f93236 Fixed #13572: copies of QueryDicts now have their encoding set correctly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-28 16:39:52 +00:00
Jacob Kaplan-Moss
8a10078a03 Converted httpwrappers tests to unittest.
We have always been at war with doctests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13313 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-28 16:27:09 +00:00
Russell Keith-Magee
eedf16d12b Fixed #13638 -- Refactored the serializers_regress tests to avoid the use of flush, and make better use of the transactional capabilities of django.test.TestCase. Thanks to Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-28 09:52:24 +00:00
Jannis Leidel
e6ec07dc1f Fixed #13592 -- Make sure the SelectDateWidget works with dates before 1900 when localization is enabled. Thanks for the report and patch, magnus.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13301 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-23 10:38:23 +00:00
Jannis Leidel
b057a8b247 Fixed #13560 -- Fixed localization of widgets.
Particularly this fixes the SplitDateTimeField and the AdminDateWidget by localizating the widget's value in its render method instead of the form field. Thanks to David Danier for the report and Russell for help with the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-21 14:07:54 +00:00