Commit Graph

739 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 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 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 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 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 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 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
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
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
Malcolm Tredinnick 09d84c4d40 [1.0.X] Applying a limit to a queryset that already had an upper limit of 0
wasn't working properly.

Backport of r9201 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 08:43:31 +00:00
Malcolm Tredinnick 318c1c32dd [1.0.X] The tests added in r9185 were altering the test environment in bad
ways. Fixed this with proper setUp() and tearDown() methods.

Backport of r9200 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9203 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08 08:42:39 +00:00
Malcolm Tredinnick b3c2cf3d1d [1.0.X] Fixed #9233 -- Allow date and message-id headers to be passed in
manually in email messages. Previously we were creating duplicate headers,
which was bad.

Backport of r9197 from trunk. I'm calling this a bugfix, since the docs are
unclear about which headers you can pass into an EmailMessage constructor.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07 12:26:00 +00:00
Malcolm Tredinnick fb4f82f2ea Reverted r9186 -- Committed to the wrong branch (it's a feature addition).
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07 09:04:55 +00:00
Malcolm Tredinnick ed48b0b37e Fixed #5888 -- Added methods to the test client to support HEAD, PUT, DELETE
and OPTIONS support. Thanks Scott Barr and Leah Culver.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07 08:47:05 +00:00
Malcolm Tredinnick 66c77d03d2 [1.0.X] Fixed #9199 -- We were erroneously only prepending "www" to the domain
if we also needed to append a slash (when PREPEND_WWW=True).

Based on a patch and tests from gonz. Thanks.

Backport of r9184 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07 08:26:31 +00:00
Malcolm Tredinnick b5ac7f7918 [1.0.X] Added some better error reporting and path handling when creating template paths.
We now raise UnicodeDecodeError for non-UTF-8 bytestrings (thanks to Daniel
Pope for diagnosing this was being swallowed by ValueError) and allow UTF-8
bytestrings as template directories. (The last bit is arguably a feature-add,
but we allow UTF-8 bytestrings everywhere else, so I'm counting it as a bugfix.)

Refs #8965.

Backport of r9161 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9162 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-06 06:37:53 +00:00
Malcolm Tredinnick 571b159dd3 [1.0.X] Fixed #9259 -- Fixed a validation error for Spanish identity card numbers.
Patch from Marc Garcia.

Backport of r9129 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 06:00:55 +00:00
Malcolm Tredinnick ccc2387fd2 [1.0.X] Add internationalisation support to the comment templates. Fixed #8868, #8905
Thanks to zgoda for a patch that did most of the internationalisation part.

Backport of r9119 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9126 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:20:00 +00:00
Malcolm Tredinnick 389307025f [1.0.x] Fixed #8803 -- Allow authenticated users without first_name/last_name values set to post comments.
Backport of r9118 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:18:25 +00:00
Malcolm Tredinnick e4bc9e1f4a [1.0.X] Altered a failing url template tag test to work more reliably.
There's no guarantee about the order in which ambiguous patterns are resolved.
The solution is "don't do that" and avoid ambiguity.

This is a port of r9113 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:02:55 +00:00
Malcolm Tredinnick b17453bbc9 [1.0.X] Fixed another case of reverse URL resolving that wasn't working.
This is a similar situation to that fixed in r9087. We weren't merging
multiple levels of include() calls together correctly.

Backported from r9099 on trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9100 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-30 05:57:13 +00:00