summaryrefslogtreecommitdiff
path: root/tests/regressiontests
AgeCommit message (Collapse)Author
2009-01-05Reconciling where- and having-clause behaviour.Malcolm Tredinnick
Extricated the code that works directly with SQL columns (standard "where" stuff) from the the code that takes SQL fragments and combines it with lookup types and values. The latter portion is now more generally reusable. Any existing code that was poking at Query.having will now break in very visible ways (no subtle miscalculations, which is a good thing). This patch, en passant, removes the existing "having" test, since the new implementation requires more setting up than previously. The aggregates support (currently in a separate codebase) has tests for this functionality that work as a replacement for the removed test. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-03Fixed #9942 -- Added a to_python handler for FloatField to ensure correct ↵Russell Keith-Magee
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. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-23Fixed #8245 -- Added a LOADING flag to autodiscover to prevent an admin.py ↵Gary Wilson Jr
module with errors from raising a spurious AlreadyRegistered exception in a subsequent call to autodiscover. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9680 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16Follow-up to r9656 -- beef up the added test to exercise all (one can hope) ↵Karen Tracey
paths through the troublesome get_deleted_objects function and fix the resulting errors. Refs #9859. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16Fixed #9859 -- Added another missing force_unicode needed in admin when ↵Karen Tracey
running on Python 2.3. Many thanks for report & patch to nfg. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16Fixed #9786 -- Fixed inequality checking for ↵Malcolm Tredinnick
django.db.models.fields.file.FieldFile class. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-10If an SQL query doesn't specify any ordering, avoid the implicit sortMalcolm Tredinnick
that happens with MySQL when a "GROUP BY" clause is included. This is a backend-specific operation, so any other databases requiring similar encouragement can have a function added to their own backend code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-08This fixes a group of problems in the SQL created by QuerySet.exclude() whenMalcolm Tredinnick
used in a few situations where NULL results can appear. Fixed #8921 (the only ticket I know of that noticed any of these). git-svn-id: http://code.djangoproject.com/svn/django/trunk@9590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-07Fixed #9188 -- Fixed a case where we were generating syntactically invalid ↵Malcolm Tredinnick
SQL in some exclude() queries. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-05Added a way to iterate over hidden/visible fields in a form. Useful for manualMalcolm Tredinnick
form layout. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02Fixed #9706: made SlugField honor max_length in Oracle, matching the other ↵Ian Kelly
backends. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02Fixed #9736 -- Added quoting to the SQL constraint names generated during ↵Russell Keith-Magee
table creation. This is to accommodate primary keys with spaces. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-24Here's the rest of [9530] where I actually rename the tag like I said I did. ↵Jacob Kaplan-Moss
I swear this was git's fault, not mine. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9532 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-24Fixed #6398: added an optional `{% empty %}` clause to the `{% for %}` ↵Jacob Kaplan-Moss
template tag. The contents of this clause are rendered if the list iterated over turns out to be empty. Thanks, Jannis Leidel. Astute readers will notice that the patch originally called this `default`; after consideration I decided that `empty` is a very slightly better color for this particular bikeshed. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16Fixed #9608: Ensured a Model's default repr() is printable even if its ↵Karen Tracey
__unicode__ method raises a Unicode error. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16Fixed #3501 -- Fixed date filtering in querysets for nullable date fields. OnlyMalcolm Tredinnick
affects SQLite. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-15Fixed #9258 -- Use _default_manager in ↵Brian Rosner
ForeignKeyRawIdWidget.label_for_value. Thanks nullie for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-15Fixed #6948 -- The join filter was escaping the literal value that wasMalcolm Tredinnick
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. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9442 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-14Fixed #9592 -- Create data for the generic_inline_admin test during setup ↵Karen Tracey
instead of via a fixutre since it uses a content type id which will vary depending on what other tests have been run. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9438 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-13Fixed #9498 -- Handle a formset correctly when the foreign key is not ↵Brian Rosner
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. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-12Fixed #9351 -- Modified the test client to pass on URL encoded parameters to ↵Russell Keith-Magee
the underlying views. Thanks to sime for the suggestion. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-12Fixed #5079 -- Avoid converting Decimals to floats during save to the database.Karen Tracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10Add tests mistakenly left out of r9397.Karen Tracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10Fixed #7064: Made DemicmalField validation support max_digits equal to ↵Karen Tracey
decimal_places. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9387 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10Fixed #6035 -- Gave the SplitDateTimeField the proper default widget. ↵Karen Tracey
Thanks dtulig. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-10Fixed #8910 -- Added force_unicode during admin log message creation to ↵Karen Tracey
avoid triggering a Python 2.3 bug. Thanks for the report joshg and patch nfg. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-09Fixed #9514 -- Made admin change_form template correctly recognize/report ↵Karen Tracey
when a form has only a single error. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9371 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-08Fixed #5748 -- Made floatformat filter round properly on all platforms and ↵Karen Tracey
handle NaN input correctly on Windows. Also added tests for these cases. Thanks for the report and initial patch to SmileyChris and PJCrosier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06Fixed #6160, #9111 -- Consistently apply conditional_escape to form errors ↵Karen Tracey
and labels when outputing them as HTML. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9365 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06Added new fixture file accidentally left out of [9357].Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-06Fixed #9011 -- Corrected handling of fixture files that contain errors to ↵Russell Keith-Magee
correctly report the broken fixture name. Thanks to jlrivitti@gmail.com for the report and initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-28Fixed #8966 -- Changed is_safe for length_is filter to False, since its ↵Karen Tracey
return value is a boolean, not a string. Thanks Thomas Steinacher and carljm. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24Fixed #7179 -- Changed breadcrumbs on the add page so that a link to the ↵Karen Tracey
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/trunk@9276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24Fixed #9411 -- Changed the test from r9081 to be more robust across ↵Malcolm Tredinnick
different database backends. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24Fixed #9406 -- Ensure that each database column is only represented once in theMalcolm Tredinnick
"ORDER BY" clause of an SQL statement. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9251 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24Fixed #9383 -- Don't open a network connection for sending email if there'sMalcolm Tredinnick
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. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-22Fixed #9252 -- Moved the try/except protecting against incorrect lookup ↵Karen Tracey
params to where the error is now raised, and added a test for this case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-21Fixed #3096 -- Make admin list_filters respect limit_choices_to.Karen Tracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10Yet more file storage testing cleanup for the sake of buildbots; this should ↵Jacob Kaplan-Moss
be the last of it, I hope. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10More be-nice-to-the-buildbot: be better about cleaning up files created by ↵Jacob Kaplan-Moss
the cache/session tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10Fixed .distinct() not working with slicing in Oracle, due to the Ian Kelly
row numbers necessarily being distinct. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08Fixed #9053 -- Allowed for sorting of callable and ModelAdmin methods ↵Karen Tracey
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. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08Fixed #9319 -- Fixed a crash when using the same model field in multipleMalcolm Tredinnick
unique_together constraints. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08A queryset that has had ordering removed (order_by()) can have ordering addedMalcolm Tredinnick
again later (order_by('foo')). Or, at least, it can now. Thanks to Ilya Novoselov for diagnosing the problem here. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08Fixed #6748 -- When printing the repr() of querysets, don't load or displayMalcolm Tredinnick
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". git-svn-id: http://code.djangoproject.com/svn/django/trunk@9202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08Applying a limit to a queryset that already had an upper limit of 0 wasn'tMalcolm Tredinnick
working properly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9201 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-08The tests added in r9184 were altering the test environment in bad ways. FixedMalcolm Tredinnick
this with proper setUp() and tearDown() methods. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07Fixed #9233 -- Allow date and message-id headers to be passed in manually inMalcolm Tredinnick
email messages. Previously we were creating duplicate headers, which was bad. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07Fixed #5888 -- Added methods to the test client to support HEAD, PUT, DELETEMalcolm Tredinnick
and OPTIONS support. Thanks Scott Barr and Leah Culver. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07Fixed #9199 -- We were erroneously only prepending "www" to the domain if weMalcolm Tredinnick
also needed to append a slash (when PREPEND_WWW=True). Based on a patch and tests from gonz. Thanks. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9184 bcc190cf-cafb-0310-a4f2-bffc1f526a37