Commit Graph

1118 Commits

Author SHA1 Message Date
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
Gary Wilson Jr 3abbb455b2 [1.0.X] Fixed #8245 -- Added a LOADING flag to autodiscover to prevent an admin.py module with errors from raising a spurious AlreadyRegistered exception in a subsequent call to autodiscover.
Backport of r9680 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-23 18:28:22 +00:00
Karen Tracey 73534cd942 [1.0.X] Fixed #9865 -- Allow saving of new inline-edited objects with custom non-auto primary key fields that are not the foreign key to the parent object.
r9664 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-21 04:58:59 +00:00
Karen Tracey ae5c9b33d0 [1.0.X] Fixed #9859 -- Added another missing force_unicode needed in admin when running on Python 2.3. Many thanks for report & patch with test to nfg.
Also enhanced the new test to hopefully exercise all paths through the get_deleted_objects function, and fixed the errors pointed out by the beefed-up test.

r9656 and r9657 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9658 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 17:53:33 +00:00
Malcolm Tredinnick 518c4ca2a8 [1.0.X] Removed one test that is only intended for PostgreSQL from the
visibility of other databases. This basically hides an annoying warning when
running the tests under MySQL.

Backport of r9469 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 06:48:15 +00:00
Malcolm Tredinnick 0a0aba5f5e [1.0.X] Fixed #9786 -- Fixed inequality checking for django.db.models.fields.file.FieldFile class.
Backport of r9647 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 04:54:29 +00:00
Malcolm Tredinnick 61e36bd7d1 [1.0.X] This fixes a group of problems in the SQL created by QuerySet.exclude()
when used in a few situations where NULL results can appear.

Fixed #8921 (the only ticket I know of that noticed any of these).

Backport of r9590 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-08 02:47:05 +00:00
Malcolm Tredinnick a8a4743b1d [1.0.X] Fixed #9188 -- Fixed a case where we were generating syntactically invalid SQL in some exclude() queries.
Backport of r9588 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-07 05:50:26 +00:00
Ian Kelly a261602bd3 [1.0.X] Fixed #9706: made SlugField honor max_length in Oracle, matching the other backends. Backport of [9548] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02 18:42:30 +00:00
Russell Keith-Magee af6b7cdc63 [1.0.X] Fixed #9736 -- Added quoting to the SQL constraint names generated during table creation. This is to accommodate primary keys with spaces.
Merge of [9543] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02 13:34:00 +00:00
Karen Tracey df9254c2f3 [1.0.X] Fixed #9615 -- Typo fix to testcase. Thanks jarrow.
r9519 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-21 16:56:24 +00:00
Karen Tracey bdae3cc27d [1.0.X] Fixed #9608: Ensured a Model's default repr() is printable even if its unicode method raises a Unicode error.
r9475 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16 19:08:53 +00:00
Malcolm Tredinnick aed11333f1 [1.0.X] Fixed #6052 -- Worked around a bug in MySQLdb with regards to handling
SafeUnicode (handle SafeString similarly, just to be safe). Based on a patch
from sfllaw.

Backport of r9467 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9469 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16 08:57:10 +00:00
Malcolm Tredinnick d7e1856776 [1.0.X] Fixed #3501 -- Fixed date filtering in querysets for nullable date fields. Only affects SQLite.
Backport of r9466 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9468 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16 08:55:10 +00:00
Brian Rosner 781a1763d9 [1.0.X] Fixed #9258 -- Use _default_manager in ForeignKeyRawIdWidget.label_for_value. Thanks nullie for the patch.
Backport of r9444 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-15 02:21:32 +00:00
Malcolm Tredinnick 014c563662 [1.0.X] Fixed #6948 -- The join filter was escaping the literal value
that was passed in for the connector. This was contrary to what the
documentation for autoescaping said and to what every other filter does
with literal strings as arguments.

This is backwards incompatible for the situation of the literal string
containing one of the five special HTML characters: if you were writing
{{ foo|join:"&" }}, you now have to write {{ foo| join:"&amp;" }}.
Previous behaviour was, as noted, a bug and contrary to what was
documented and expected.

Backport of r9442 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-15 01:24:53 +00:00
Karen Tracey dbe18ce542 [1.0.X] Fixed #9592 -- Create data for the generic_inline_admin test during setup instead of via a fixutre since it uses a content type id which will vary depending on what other tests have been run.
r9438 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-14 14:52:55 +00:00
Brian Rosner f219136e11 [1.0.X] Fixed #9498 -- Handle a formset correctly when the foreign key is not available (for now).
This case pops up with generic foreign key inlines after [9297]. Added tests
to handle future regressions with generic foreign key inlines in the admin.

Thanks markus and danielr for patches.

Backport of [9412] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9413 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-13 19:05:49 +00:00
Karen Tracey 2a1c9072fb [1.0.X] Fixed #5079 -- Avoid converting Decimals to floats during save to the database.
[9394] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-12 00:38:48 +00:00
Karen Tracey 21e0efcd64 [1.0.X] Fixed #7064: Made DemicmalField validation support max_digits equal to decimal_places.
r9387 and r9388 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10 20:04:42 +00:00
Karen Tracey 8c31bb7ca3 [1.0.X] Fixed #6035 -- Gave the SplitDateTimeField the proper default widget. Thanks dtulig.
r9385 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9386 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10 19:46:13 +00:00
Karen Tracey 4a3dcd7f5e [1.0.X] Fixed #8910 -- Added force_unicode during admin log message creation to avoid triggering a Python 2.3 bug. Thanks for the report joshg and patch nfg.
[9383] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9384 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10 17:26:13 +00:00
Karen Tracey 3ced836c73 [1.0.X] Fixed #9514 -- Made admin change_form template correctly recognize/report when a form has only a single error.
[9371] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-09 18:54:12 +00:00
Karen Tracey dc0389cca0 [1.0.X] Fixed #5748 -- Made floatformat filter round properly on all platforms and handle NaN input correctly on Windows. Also added tests for these cases. Thanks for the report and initial patch to SmileyChris and PJCrosier.
[9369] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-08 01:53:20 +00:00
Karen Tracey 335f4ac03d [1.0.X] Fixed #6160, #9111 -- Consistently apply conditional_escape to form errors and labels when outputing them as HTML.
[9365] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06 19:53:36 +00:00
Russell Keith-Magee 6be20bf64c [1.0.X] Fixed #9011 -- Corrected handling of fixture files that contain errors to correctly report the broken fixture name. Thanks to jlrivitti@gmail.com for the report and initial patch.
Merge of [9357] and [9358] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06 11:27:33 +00:00
Karen Tracey dcfafea408 [1.0.X] Fixed #9218 -- Simplified the fix from #9039 and added tests to ensure this case doesn't break again (and that the simplification didn't break anything).
[9341] from trunk.  Also updated svnmerge metadata.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-05 19:55:51 +00:00
Karen Tracey 8e4827e506 [1.0.X] Fixed #9418 -- When saving a model form, defer saving of file-type fields until after other fields, so that callable upload_to methods can use data from the other fields. Thanks to Bernd Schlapsi for the report and initial patch.
[9334] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-04 19:54:28 +00:00
Brian Rosner 6c069d2a71 [1.0.X] Fixed #9494 -- Ensure the foreign key in an inline formset is always present on the forms. Thanks Fugazi for the report.
Backport of r9326 from trunk

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-01 22:26:44 +00:00
Brian Rosner 7b80af625b [1.0.X] Fixed #8882 -- When a foreign key is among the unique_together fields in an inline formset properly handle it.
Backport of r9297 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-31 22:09:56 +00:00
Brian Rosner 38d9b0919b [0.5.X] Fixed #9462 -- Set the instance in an inline formset correctly so that None does not get passed through to the queryset. Thanks tobias and copelco for the ticket.
Backport of r9293 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9294 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-28 20:03:56 +00:00
Karen Tracey 84216ef05e [1.0.X] Fixed #8966 -- Changed is_safe for length_is filter to False, since its return value is a boolean, not a string.
Thanks Thomas Steinacher, carljm, and SmileyChris.

Backport of r9291 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9292 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-28 19:04:59 +00:00
Karen Tracey a8a07c2057 [1.0.X] Fixed #9039 take 2 -- Modified the new tests added in [9240] so they pass on Oracle.
Backport of [9288] from trunk, also updated svnmerge.py metadata.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9290 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-28 16:30:19 +00:00
Karen Tracey bffc238a2f [1.0.X] Fixed #7179 -- Changed breadcrumbs on the add page so that a link to the change view is not included when the user doesn't have permission for that view. Also added tests to ensure the link is not there when it shouldn't be, and there when it should be. Thanks for the report & patch alen__ribic.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24 19:18:10 +00:00
Karen Tracey d323ef20d3 [1.0.X] Fixed #9411 -- Changed the test from r9081 to be more robust across different database backends.
Backport of [9254] from trunk (I neglected to mention in the ticket this affected 1.0.X branch).

Also updated svnmerge metadata; all eligible fixes have been backported and all others blocked.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24 18:13:35 +00:00
Malcolm Tredinnick 6c85612499 [1.0.X] Backed out r9250. I committed this to the branch by mistake; there's no
bug in functionality fixed by this. Refs #9383.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9253 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24 06:15:54 +00:00
Malcolm Tredinnick b52e45193f [1.0.X] Fixed #9406 -- Ensure that each database column is only represented
once in the "ORDER BY" clause of an SQL statement.

Backport of r9251 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9252 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24 06:11:37 +00:00
Malcolm Tredinnick 43f6136f0f [1.0.X] Fixed #9383 -- Don't open a network connection for sending email if
there's nothing to send. Saves a bit of time when, for example, processing
500-error emails with no ADMINs configured. Based on a patch from Jesse Young.

Backport of r9248 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24 04:41:58 +00:00
Karen Tracey 74997f95de [1.0.X] Fixed #9252 -- Moved the try/except protecting against incorrect lookup params to where the error is now raised, and added a test for this case.
Backport of [9245] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-22 23:14:48 +00:00
Karen Tracey 118383c607 [1.0.X] Fixed #3096 -- Make admin list_filters respect limit_choices_to.
Backport of [9241] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9242 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-21 19:06:44 +00:00
Karen Tracey bd60c52c3c [1.0.X] Fixed #9039 -- Don't perform unique checks on NULL values, since NULL != NULL in SQL.
Backport of [9239] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-21 14:07:36 +00:00
Malcolm Tredinnick 909371e5e5 [1.0.X] Fixed .distinct() not working with slicing in Oracle, due to the
row numbers necessarily being distinct.

Backport of r9221 from trunk (since Ian doesn't have commit privileges at the
moment).


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-11 00:26:11 +00:00
Jacob Kaplan-Moss 6cfbd52138 [1.0.X] Yet more file storage testing cleanup for the sake of buildbots; this should be the last of it, I hope.
Backport of r9226 from trunk.



git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10 22:14:24 +00:00
Jacob Kaplan-Moss 4d692e6af1 [1.0.X] More be-nice-to-the-buildbot: be better about cleaning up files created by the cache/session tests.
Backport of r9924 from trunk.



git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9225 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10 21:42:26 +00:00
Jacob Kaplan-Moss a47f32449a [1.0.X] Be nice to buildbots: switched `modeltests/files` to use a proper isolated directory for file storage
Backport of r9222 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10 20:14:52 +00:00
Karen Tracey 9810648bef [1.0.X] Fixed #9053 -- Allowed for sorting of callable and ModelAdmin methods specified in list_display (added in r8352). Previously attempting to sort on the former would raise an exception and the latter simply didn't sort. Also added tests for this function. Thanks rgl and jenan.
Backport of [9211], also updated svnmerge.py metatdata.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9212 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 14:57:34 +00:00
Malcolm Tredinnick ced447ee97 [1.0.X] Fixed #9319 -- Fixed a crash when using the same model field in multiple
unique_together constraints.

Backport of r9208 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 10:11:02 +00:00
Malcolm Tredinnick a9936d0b1c [1.0.X] A queryset that has had ordering removed (order_by()) can have ordering
added again later (order_by('foo')). Or, at least, it can now. Thanks to Ilya
Novoselov for diagnosing the problem here.

Backport of r9206 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 09:48:21 +00:00
Malcolm Tredinnick 4b687d01ba [1.0.X] Fixed #6748 -- When printing the repr() of querysets, don't load or
display more than 20 objects.

This means that accidentally executing HugeStoryArchive.objects.all() at the
interactive prompt (or in the debug template) won't try to load all 4,233,010
stories into memory and print them out. That would previously cause resource
starvation and other "interesting" crashes.

If you really, really want the previous behaviour (e.g. in a doctest that
prints more than 20 items), display "list(qs)" instead of just "qs".

Backport of r9202 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 08:44:17 +00:00