summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2009-03-30[1.0.X]: Fixed #8462 -- Made `length` and `length_is` template filters fail ↵Gary Wilson Jr
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[1.0.X]: Made the template tests error output a bit more pretty.Gary Wilson Jr
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-29[1.0.X]: Removed an inadvertent raise statement added in [8777] and added ↵Gary Wilson Jr
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-24[1.0.X] Fixed #10589 -- Removed duplicated model definition in ↵Russell Keith-Magee
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[1.0.X] Fixed #9926 -- Fixes for some select_related() situations.Malcolm Tredinnick
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-23[1.0.X] Added an import that should have been included in [10126].Ian Kelly
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23[1.0.X] Fixed a false failure in the test suite when running Oracle. ↵Ian Kelly
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-20[1.0.X] Fixed #2698 -- Fixed deleting in the presence of custom managers.Malcolm Tredinnick
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-18[1.0.X] Corrected a problem with the database cache backend, and refactored ↵Russell Keith-Magee
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-18Fixed #10526 -- More fixes when specifying installed apps using "foo.*".Malcolm Tredinnick
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-15[1.0.X] Use plain model.Manager, or suitable proxy, for model saving.Malcolm Tredinnick
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-13[1.0.X] Fixed #10238: coerce TextField values to unicode in the oracle ↵Ian Kelly
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-10[1.0.X] Backport of [10024] from trunk. Refs #10443: Added Oracle to the ↵Ian Kelly
#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[1.0.X] Fixed #10271, #10281 -- Fixed the handling multiple inline models ↵Russell Keith-Magee
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[1.0.X] Fixed #10439 -- Fixed a subtle test failure caused by r9995.Malcolm Tredinnick
Thanks to Ramiro Morales for debugging what was going on here. Backport of r10015 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-10[1.0.X] Fixed #10443 -- Fixed model attribute updating after r10004.Malcolm Tredinnick
Adding a get_db_prep_save() call to the UpdateQuery code path meant it was being called twice if you updated an existing model attribute. This change removes that double call and also makes TimeField.to_python() a little more robust for the benefit of the Oracle backend (just in case). Backport of r10013 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10014 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08[1.0.x] Fixed #9508 -- Added an appropriate FileField.__hash__ implementation.Malcolm Tredinnick
Required because we declare a custom __eq__ method. Backport of r9997 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08[1.0.X] Fixed #9323 -- Allow glob loading in INSTALLED_APPS to handle digits ↵Malcolm Tredinnick
in names. Patch from carljm. Backport of r9994 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08[1.0.X] Fixed #10432 -- Handle all kinds of iterators in queryset filters.Malcolm Tredinnick
Only consumes the iterators once and works with Python 2.3. Backport of r9986 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06[1.0.X] Fixed #9649 -- Better error handling in model creation.Malcolm Tredinnick
Previously, you could explicitly assign None to a non-null ForeignKey (or other) field when creating the model (Child(parent=None), etc). We now throw an exception when you do that, which matches the behaviour when you assign None to the attribute after creation. Thanks to ales.zoulek@gmail.com and ondrej.kohout@gmail.com for some analysis of this problem. Backport of r9983 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9984 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-06[1.0.X] Improved table join handling for comparisons against NULL.Malcolm Tredinnick
This fixes a broad class of bugs involving filters that look for missing related models and fields. Most of them don't seem to have been reported (the added tests cover the root cause). The exception is that this has also fixed #9968. Backport of r9979 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04[1.0.X] Fixed #10406 -- Fixed some problems with model inheritance and pk ↵Malcolm Tredinnick
fields. Manually specifying both a OneToOneField(parent_link=True) and separate a primary key field was causing invalid SQL to be generated. Thanks to Ramiro Morales for some analysis on this one. Backport of r9971 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04[1.0.X] Fixed #10251 -- Fixed model inheritance when there's also an ↵Malcolm Tredinnick
explicit pk field. Backport of r9970 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9972 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04[1.0.X] Changed the row count value returned from update queries in some cases.Malcolm Tredinnick
If an update only affected an ancestor model (not the child), we were returning 0 for the number of rows updated. This could have been misleading if the value is used to detect an update occuring. So we now return the rowcount from the first non-trivial query that is executed (if any). Still a slight compromise, but better than what we had. Backport of r9966 from trunk (turns out this *is* a bugfix, since the returned rowcount is used in Model.save(force_update=True)). git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-04[1.0.X] Fixed #10362 -- An update() that only affects a parent model no ↵Malcolm Tredinnick
longer crashes. This includes a fairly large refactor of the update() query path (and the initial portions of constructing the SQL for any query). The previous code appears to have been only working more or less by accident and was very fragile. Backport of r9967 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02[1.0.X] Removed a test that was accidentally merged as part of r9927.Malcolm Tredinnick
This was testing a feature that doesn't exist in the 1.0.X branch. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9948 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01[1.0.X] Fixed a misnamed test that was inadvertently hiding an earlier one.Malcolm Tredinnick
Backport of r9929 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01[1.0.X] Fixed insert/update handling when no database interaction is required.Malcolm Tredinnick
Fixed #10205 as part of this. Backport of r9926 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01[1.0.X] Fixed #10202 -- Fixed another couple of slicing edge-cases with ↵Malcolm Tredinnick
querysets. Patch from Alex Gaynor and Ramiro Morales. Backport of r9924 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9925 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-28[1.0.X] Fixed #10028 -- Fixed a problem when ordering by related models.Malcolm Tredinnick
Some results were inadvertently being excluded if we were ordering across a nullable relation which itself ordering by a non-nullable relation. Backport of r9916 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-24[1.0.X] Fixed #10347 -- Fixed incorrect AttributeError raised when ↵Karen Tracey
attempting to access a FileField without an instance. Thanks for the report and patch dc. [9902] from trunk. Also updated svnmerge metadata; all trunk changesets have either been merged or blocked. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-24[1.0.X] Fixed #9214: EmailMessage now respects the From header instead of ↵Jacob Kaplan-Moss
blindly using from_email. Thanks, Tai Lee. Backport of r9842 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23[1.0.X] Fixed #10274 -- Fixed an embarrassing mistake in ↵Brian Rosner
BaseGenericInlineFormSet.get_queryset. Thanks Zak Johnson for the report and akaihola for the patch. Backport of r9886 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-22[1.0.X] Fixed #10256 -- Corrected the interaction of extra(select=) with ↵Russell Keith-Magee
values() and values_list() where an explicit list of columns is requested. Merge of r9837 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-11[1.0.X] Fixed #5903 -- DecimalField.get_default() now correctly returns a ↵Brian Rosner
Decimal object when the model instance was not retrieved from the database. Thanks Justin Driscoll and pigletto. Backport of r9823 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-03Fixed #10075: Allowed saving of inline-edited models that use multi-table ↵Karen Tracey
inheritance. r9809 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-23[1.0.X] Fixed #10103: Testcase fix for Jython compatibility. Thanks for ↵Karen Tracey
report and patch leosoto. r9782 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-19[1.0.X] Fixed #10069 -- Fixed the model form unique validation code to not ↵Karen Tracey
proceed with using, for example, RelatedObjects returned by get_field_by_name as though they were model Fields. r9777 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-18[1.0.X] Corrected code in serializers_regress testcase so that, in the case ↵Karen Tracey
where an exception has been raised, rollback is called before attempting to leave transaction management. With the old code the original exception (IntegrityError on InnoDB) was getting hidden by a transaction management error resulting from attempting to leave transaction management with a pending commit/rollback. r9773 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16[1.0.X] Fixed #5543: callproc() and friends now work with Oracle and our ↵Matt Boersma
FormatStylePlaceholderCursor. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9768 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-08[1.0.X] Fixed #9985 -- qs.values_list(...).values(...) was constructing ↵Malcolm Tredinnick
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-03[1.0.X] Fixed #9942 -- Added a to_python handler for FloatField to ensure ↵Russell Keith-Magee
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
2008-12-23[1.0.X] Fixed #8245 -- Added a LOADING flag to autodiscover to prevent an ↵Gary Wilson Jr
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-21[1.0.X] Fixed #9865 -- Allow saving of new inline-edited objects with custom ↵Karen Tracey
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-16[1.0.X] Fixed #9859 -- Added another missing force_unicode needed in admin ↵Karen Tracey
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[1.0.X] Removed one test that is only intended for PostgreSQL from theMalcolm Tredinnick
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[1.0.X] Fixed #9786 -- Fixed inequality checking for ↵Malcolm Tredinnick
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-08[1.0.X] This fixes a group of problems in the SQL created by QuerySet.exclude()Malcolm Tredinnick
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-07[1.0.X] Fixed #9188 -- Fixed a case where we were generating syntactically ↵Malcolm Tredinnick
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-02[1.0.X] Fixed #9706: made SlugField honor max_length in Oracle, matching the ↵Ian Kelly
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