Commit Graph

1194 Commits

Author SHA1 Message Date
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