Russell Keith-Magee
649463dd34
Fixed #4412 -- Added support for optgroups, both in the model when defining choices, and in the form field and widgets when the optgroups are displayed. Thanks to Matt McClanahan <cardinal@dodds.net>, Tai Lee <real.human@mrmachine.net> and SmileyChris for their contributions at various stages in the life of this ticket.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 07:53:02 +00:00
Russell Keith-Magee
825622d912
Fixed #7773 -- Added some simple tests for EmailMessage. Thanks to serialx for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 02:38:41 +00:00
Jacob Kaplan-Moss
46786b4193
Fixed #7741 : django.newforms is now django.forms. This is obviously a backwards-incompatible change. There's a warning upon import of django.newforms itself, but deeper imports will raise errors.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 01:22:26 +00:00
Brian Rosner
a19ed8aea3
Merged the newforms-admin branch into trunk.
...
This is a backward incompatible change. The admin contrib app has been
refactored. The newforms module has several improvements including FormSets
and Media definitions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 23:54:34 +00:00
Jacob Kaplan-Moss
7997133a3d
Fixed #3639 : updated generic create_update views to use newforms. This is a backwards-incompatible change.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 19:45:00 +00:00
Jacob Kaplan-Moss
cd80ce7a3d
Added missing files form [7946]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7950 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 17:39:31 +00:00
Malcolm Tredinnick
c681f4070c
Removed the mysql_old backend. It smells bad and has no friends.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 17:38:53 +00:00
Adrian Holovaty
df2b19cc17
Fixed #1443 -- Django's various bits now support dates before 1900. Thanks to SmileyChris, Chris Green, Fredrik Lundh and others for patches and design help
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 03:47:27 +00:00
Russell Keith-Magee
c4d0cfe1ee
Refs #7745 -- Modified use of assertTrue to failUnless, because assertTrue isn't available in Python 2.3. Thanks to Karen Tracey for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-17 13:29:35 +00:00
Malcolm Tredinnick
431206a252
Fixed #7786 -- Removed some tests from running when using Python 2.3.
...
The problem being "hidden" here is not serious. It won't affect correct code
and only gives a different failure mode for incorrect code. The moral is: don't
write incorrect code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7939 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-16 23:55:10 +00:00
Malcolm Tredinnick
52fdedba48
Fixed #7759 -- Fixed QuerySet.count() when the results cache was only partially
...
populated.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-16 23:17:29 +00:00
Malcolm Tredinnick
3b37c8151a
Fixed #7411 -- worked around some possible transaction conflicts in SQLite.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-15 18:47:32 +00:00
Russell Keith-Magee
e867c5a0cc
Removed a Python2.3 incompatible generator construct. Thanks to Karen Tracey for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7921 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-14 04:57:01 +00:00
Russell Keith-Magee
be6ca58d43
Fixed #7728 -- Modified the output check in the admin script tests. Checking for pyc is a CPython-specific check, and it breaks CPython if pyc files aren't generated (due to permission problems, etc). Thanks to Maciej Fijalkowski (fijal) for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-13 08:57:30 +00:00
Russell Keith-Magee
32b8c3e1c0
Fixed #7718 -- Added a naive implementation of sorted() for Python 2.3 compatibility, and modified test cases to import the function when required.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7914 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-13 08:48:18 +00:00
Jacob Kaplan-Moss
185ba8f7e4
FIxed #7696 : fixed model_form tests on Windows after [7814]. Thanks, Marty Alchin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7909 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 20:44:05 +00:00
Jacob Kaplan-Moss
8e852a92ec
Fixed #7613 : fixed file_upload tests when LANG=C. Thanks, eddymul.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7904 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 20:43:03 +00:00
Russell Keith-Magee
4aa6c57251
Fixed #7583 -- Corrected the testing docs that referred to the defunct headers attribute of the response. Added a test case to validate (and document) the new behavior. Thanks to Malcolm for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 06:16:42 +00:00
Russell Keith-Magee
e31945a2ad
Fixed #7303 -- Clarified a test case that was dependent on dict ordering. Thanks to leosoto for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 14:29:47 +00:00
Russell Keith-Magee
8e0b6bdcd5
Fixed #6017 -- Modified the Lax parser to allow --settings and the other core management arguments to appear anywhere in the argument list. Thanks to Todd O'Bryan for the suggestion and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 13:18:19 +00:00
Russell Keith-Magee
4516233f9e
Fixed #7715 -- Modified the admin_scripts tests to do an app level import, rather than a project level import. This removes the potential for conflict between the admin script tests and the settings for the test suite itself. Thanks to Malcolm Tredinnick for his help hunting this one down.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 13:04:17 +00:00
Malcolm Tredinnick
2b193f6100
Fixed #7698 -- Handle '0' correctly when used as the upper bound of a slice.
...
Based on a patch from enoksrd.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 12:43:27 +00:00
Malcolm Tredinnick
7936c0b917
Fixed #7448 -- Convert "in" filters to pass in the correct values for datetimes
...
and similar complex objects.
Based on patches from cgrady and alexkosholev. Refs #7707 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7883 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 09:00:35 +00:00
Russell Keith-Magee
e18fccc62e
Corrected a bug in [7876] picked up by the buildbot: depending on the order in which tests are run, some tests would fail because of a dependency on the current working directory.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-10 13:53:45 +00:00
Russell Keith-Magee
9376d4ed5b
Refs #5943 , #6107 -- Added framework and tests to check for the correct operation of django-admin and manage.py. Thanks for Simon Willison and Karen Tracey for their contributions and assistance testing this patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-10 12:12:41 +00:00
Malcolm Tredinnick
a616b92174
Fixed test suite after [7687].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7868 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-08 05:28:37 +00:00
Jacob Kaplan-Moss
a28b75b0ba
Fixed #7614 : the quickening has come, and there now is only one UploadedFile. On top of that, UploadedFile's interface has been improved:
...
* The API now more closely matches a proper file API. This unfortunately means a few backwards-incompatible renamings; see BackwardsIncompatibleChanges. This refs #7593 .
* While we were at it, renamed chunk() to chunks() to clarify that it's an iterator.
* Temporary uploaded files now property use the tempfile library behind the scenes which should ensure better cleanup of tempfiles (refs #7593 again).
Thanks to Mike Axiak for the bulk of this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07 23:16:00 +00:00
Jacob Kaplan-Moss
9dabd1f8ff
Fixed #7651 : uploading multiple files with the same name now work. Also, in order to test the problem the test client now handles uploading multiple files at once. Patch from Mike Axiak.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07 22:06:32 +00:00
Malcolm Tredinnick
5deb4fcbb9
Revert [7849] and [7850]. Brain failure on my part.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 14:20:30 +00:00
Malcolm Tredinnick
c88e55b4fe
Some tests for the new features. These pretty much fail at the moment. Based on
...
SmileyChris's original work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 14:16:43 +00:00
Ian Kelly
0650bab492
Fixed a test case using extra sql that didnt fit Oracle syntax.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7832 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-03 19:02:43 +00:00
Ian Kelly
f7903f7479
Renamed a field in a test case that was preventing the tests from
...
running in Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-02 16:59:17 +00:00
Gary Wilson Jr
54d50ef5c8
Made legacy `ObjectPaginator` truly backwards-compatible by catching both `AttributeError` and `TypeError` in `_get_count` as it did before
...
[7306]. Tests included.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-02 04:31:28 +00:00
Jacob Kaplan-Moss
d725cc9734
Fixed #2070 : refactored Django's file upload capabilities.
...
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues.
This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01 15:10:51 +00:00
Russell Keith-Magee
415bd694f9
Fixed #7521 -- Added the ability to customize ROOT_URLCONF for the duration of a TestCase. Thanks to Mark Fargas (telenieko) for his work on this patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 12:34:29 +00:00
Russell Keith-Magee
9eaa05912c
Fixed #7572 -- Force the closure of the database connection at the end of fixture loading as a workaround for MySQL bug #37735 . Thanks to Simon Litchfield for his help in narrowing down this issue.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 12:18:29 +00:00
Malcolm Tredinnick
abcf1cb36d
Fixed #5957 -- Enforce the "required" attribute on BooleanField in newforms.
...
This has been the documented behaviour for ages, but it wasn't correctly
implemented. A required BooleanField must be True/checked, since False values
aren't submitted. Ideal for things like "terms of service" agreements.
Backwards incompatible (since required=True is the default for all fields).
Unclear who the original patch was from, but Tai Lee and Alex have kept it up
to date recently.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7799 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 10:44:56 +00:00
Malcolm Tredinnick
8e816c8304
Fixed #2170 -- "exact" lookups in MySQL are now case-sensitive (the same as other backends).
...
This is a backwards incompatible change if you were relying on 'exact' being
case-insensitive. For that, you should be using 'iexact'.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7798 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 10:25:35 +00:00
Malcolm Tredinnick
52cc11c4e2
Fixed #4485 -- Allow nullable DecimalFields to store NULLs.
...
Based on a patch from tdterry. Thanks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 10:07:06 +00:00
Malcolm Tredinnick
5da47e43c7
Fixed #7314 -- Changed the way extra() bits are handled when QuerySets are merged.
...
Also added a section to the documentation to indicate why it's probably not a
good idea to rely on this feature for complex stuff. Garbage in, garbage out
applies even to Django code.
Thanks to erik for the test case for this one.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 06:24:21 +00:00
Malcolm Tredinnick
b0bc8b9dfd
Fixed #7565 -- Fixed a problem with PostgreSQL sequence resetting in loaddata.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7789 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 00:38:14 +00:00
Malcolm Tredinnick
18d89cc1f7
Fixed #7323 -- Fixed a count() edge-case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-29 11:50:04 +00:00
Malcolm Tredinnick
050d0a1b75
Fixed #7371 -- Fixed an edge case when ordering on related models.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-29 11:15:48 +00:00
Malcolm Tredinnick
c17e326585
Fixed #7378 -- Use the "to_field" where appropriate on reverse relations.
...
Patch from mturtle@gmail.com . The remaining uses of "%s__pk" in
fields/related.py all look safe, since they are for many-to-many fields, which
doesn't take "to_field" as a parameter.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-29 10:35:35 +00:00
Malcolm Tredinnick
4931639636
Fixed #7276 -- Delete multi-table objects correctly.
...
When model inheritance is used, the parent objects should be deleted as part of
the delete() call on the child.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-29 09:41:35 +00:00
Malcolm Tredinnick
2c1d6a80b3
Removed a stray debugging print that slipped in.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-29 09:40:48 +00:00
Malcolm Tredinnick
a8fa3fd81f
Fixed #7246 -- Pull in the all the necessary data when using select_related() with multi-table inheritance.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7781 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-29 09:39:32 +00:00
Malcolm Tredinnick
b67164fb59
Use create() to create objects in the query regression tests, like all the Cool
...
Kids are doing these days.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7780 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-29 03:07:45 +00:00
Malcolm Tredinnick
6d79ecc8b1
Added a test to show that #7227 was also fixed by [7778].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7779 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-29 03:01:46 +00:00
Malcolm Tredinnick
bb2182453b
Fixed handling of multiple fields in a model pointing to the same related model.
...
Thanks to ElliotM, mk and oyvind for some excellent test cases for this. Fixed #7110 , #7125 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-29 02:36:18 +00:00
Malcolm Tredinnick
be6ff148c1
Fixed the fix from [7775].
...
The previous change was failing Django's "check for well-formed domain name"
validation, rather than failing on the network side. Providing we don't ever
set up www.broken.djangoproject.com as a valid domain name, this change should
let us control our own destiny.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-28 10:55:26 +00:00
Adrian Holovaty
40d2b419ab
Fixed #7559 -- Updated newforms unit tests to reflect the fact that http://www.jfoiwjfoi23jfoijoaijfoiwjofiwjefewl.com is no longer a valid domain name
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7775 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-27 21:47:58 +00:00
Malcolm Tredinnick
ade4a1246c
Reorganised the internals of the Where node a bit to fix some copying problems.
...
We no longer store any reference to Django field instances or models in the
Where node. This should improve cloning speed, fix some pickling difficulties,
reduce memory usage and remove some infinite loop possibilities in odd cases.
Slightly backwards incompatible if you're writing custom filters. See the
BackwardsIncompatibleChanges wiki page for details.
Fixed #7128 , #7204 , #7506 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-27 03:27:20 +00:00
Malcolm Tredinnick
9e23c3c5d9
EmptyQuerySet classes can now be merged with normal querysets.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 11:42:12 +00:00
Malcolm Tredinnick
0e692fda9c
Fixed the way symmetrical many-to-many relations are recorded in the Options class.
...
These types of relations don't have reverse accessor names, so that name can be
used by a normal field on the model. Fixed #7107 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 10:50:25 +00:00
Malcolm Tredinnick
279fc8599b
Fixed #7105 -- Fixed dates() queries in light of model inheritance.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7763 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 07:51:19 +00:00
Malcolm Tredinnick
d2ce1df08f
Fixed #7215 -- Create correct reverse-relation accessors when using abstract base classes. Patch from Joel Watts.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7762 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 07:04:18 +00:00
Malcolm Tredinnick
ba015e0a79
Fixed #7181 -- when ordering by a potentially NULL field, use a left-outer join
...
so that the ordering doesn't accidentally restrict the result set.
(Ironically, one existing test actually showed this problem, but I was too
dumb to notice the result was incorrect.)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7761 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 06:50:22 +00:00
Malcolm Tredinnick
e41df5adcc
Fixed #7076 -- Include NULL values when excluding non-NULL items.
...
Based on a patch from emulbreh.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 05:34:26 +00:00
Adrian Holovaty
b7fea94096
Fixed #7542 -- Fixed bug in urlize where it was appending 'http://' to the link text. Thanks for the patch and tests, devin
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7755 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 05:07:13 +00:00
Adrian Holovaty
74f0408fa2
Fixed #6201 -- Improved the {% cache %} template tag to allow the timeout to be a template variable. Inspired by the patch by zz and edrik
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7754 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 04:54:10 +00:00
Adrian Holovaty
5ee4a099f1
Fixed infuriating lack of apostrophe in a comment
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 04:33:18 +00:00
Adrian Holovaty
dbde7fc8b0
Fixed #6322 -- Fixed bug in 'ifchanged' template tag where it wasn't resetting itself properly in some cases. Thanks, nedbatchelder
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 04:30:06 +00:00
Adrian Holovaty
65437a95e1
Improved our tests so that they don't raise an error if setuptools isn't installed, hence ridding the test suite of all dependencies. Also updated docs.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 04:25:40 +00:00
Adrian Holovaty
345a096756
Negligible formatting changes to tests/regressiontests/templates/loaders.py
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 04:22:12 +00:00
Malcolm Tredinnick
5dabaf30b6
A forgotten file from [7743] (test the new DictWrapper class).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 03:16:55 +00:00
Malcolm Tredinnick
915001ad0b
Fixed #7109 -- Quote certain values before passing them for substitution in
...
Field.db_type().
This fixes a problem with using reserved words for field names in Oracle. Only
affects Oracle at the moment, but the same changes could easily be used by
other backends if they are required (requires changing creation.py, only).
This commit also reverts [7501] so that if the fix doesn't work, it will show
up in the tests (and if it does work, the tests will prevent us from breaking
it again).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7743 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 03:11:32 +00:00
Malcolm Tredinnick
588eeb356c
Fixed a problem when constructing complex select_related() calls.
...
Avoids joining with the wrong tables when connecting select_related() tables to
the main query. This also leads to slightly more efficient (meaning less tables
are joined) SQL queries in some other cases, too. Some unnecessary tables are
now trimmed that were not previously.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 01:02:11 +00:00
Malcolm Tredinnick
1834428648
Fixed a problem with values() and values_list() queries and nullable joins.
...
Previously, if we were querying across a nullable join and then a non-nullable
one, the second join would not be a LEFT OUTER join, which would exclude
certain valid results from the result set.
This is the same problem as [7597] but for values() field specifications, so
this covers the second case where Django adds extra stuff to the select-clause.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 01:01:21 +00:00
Russell Keith-Magee
b8f7b39ccc
Fixed #7155 -- Corrected DateQuerySet to handle nullable fields. Thanks to fcaprioli@alice.it for the original report and patch, and to Jeremy Dunck for the test case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-25 13:38:06 +00:00
Russell Keith-Magee
c8d39f15cb
Fixed #7521 -- Reverted [7716]. Fixed URLs in test case broke any application that deployed contrib.auth.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-23 12:17:57 +00:00
Luke Plant
b1851cca3e
Fixed bug with Model.delete() which did not always delete objects in the right order.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-21 20:57:05 +00:00
Luke Plant
7c621535a2
Added tests for corner case with deleting where objects are deleted in the wrong order.
...
These tests currently fail, by design, fix will be committed shortly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-21 20:55:17 +00:00
Luke Plant
fad8e8f7c2
Added basic tests for auth.views.password_reset
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7716 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-20 17:43:12 +00:00
Russell Keith-Magee
5da67a084a
Fixed #7355 -- Modified urlize utility to handle https:// addresses. Thanks for the report and patch, clint.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-19 12:05:39 +00:00
Jacob Kaplan-Moss
1a75b5a03c
Fixed #4860 : added 'for' attributes to labels in newforms widgets. Thanks to Ivan Sagalaev and batiste@dosimple.ch for the patches.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7693 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-18 16:33:04 +00:00
Russell Keith-Magee
4317ba5799
Fixed #7318 -- Cleaned up the template inheritance logic, specifically to handle the case where the parent template has no template tags/blocks. Took the opportunity to optimize the logic a little. Thanks to Matthias Kestenholz <mk@spinlock.ch> for the original report and test case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-18 12:59:39 +00:00
Adrian Holovaty
e073861332
Fixed #6831 -- Reverse URL resolver now replaces backslashes correctly. Thanks, Bastian Kleineidam
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 04:16:21 +00:00
Adrian Holovaty
95fae79120
Fixed #7456 -- Removed check of exact IndexError exception text in a unit test, for Jython compatibility. Thanks, leosoto
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7646 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 03:32:02 +00:00
Russell Keith-Magee
57311b5998
Fixed #7256 -- Corrected queryset code to return the correct set of columns when the query has an empty values() clause as well as extra selects from an extra() clause. Thanks to Nicolas Lara for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-15 06:24:41 +00:00
Russell Keith-Magee
b9113ca81f
Fixed #7327 -- Added documentation and test case for defining subqueries. Thanks, Sebastian Noack.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-12 13:19:37 +00:00
Adrian Holovaty
5309e18cbf
Fixed #7026 -- Fixed misleading/incorrect exception text when adding to a many-to-many set on an object that doesn't yet have a primary-key value. Thanks for the report, ryan@peaceworks.ca
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-12 04:13:16 +00:00
Jacob Kaplan-Moss
b5f92938ab
Fixed #7298 : prevent update() on sliced QuerySet since UPDATE doesn't reliably support LIMIT/OFFSET. Thanks, George Vilches.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7601 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-09 16:17:54 +00:00
Russell Keith-Magee
12716794db
Fixed #7350 , #7202 -- Fixed serialization for multi-model inheritance, which had multiple problems:
...
* Serializers were including all superclass fields in their output. Now only local fields are included.
* Implicit OneToOne primary keys were not correctly added to the metamodel, so they were always marked to be serialized, even though they were primary
* Model saving was too aggressive about creating new parent class instances during deserialization. Raw save on a model now skips saving of the parent class.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-09 14:03:35 +00:00
Jacob Kaplan-Moss
31d9dc07aa
Fixed #7369 : fixed a corner-case involving select_related() following non-null FKs after null ones. Thanks, George Vilches
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-08 18:13:46 +00:00
Russell Keith-Magee
511e01d978
Fixed #4371 -- Improved error checking when loading fixtures. Code now catches explicitly named fixture formats that are not supported (e.g, YAML fixtures if you don't have PyYAML installed), and fixtures that are empty (which can happen due to XML tag errors). Thanks to John Shaffer for the suggestion, and Keith Bussell for his work on the fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-08 08:21:18 +00:00
Russell Keith-Magee
8a7bbc3c34
Fixed #5836 -- Corrected the logic in the Test Client when an exception raised by a view is caught and re-raised. Thanks for the report, test case, and fix, Chris Wagner.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-07 06:25:59 +00:00
Russell Keith-Magee
08401959d8
Fixed #7165 -- Added an assertNotContains() method to the test client. Thanks for the suggestion and implementation, J. Pablo Fernandez <pupeno@pupeno.com>.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-06 13:50:02 +00:00
Russell Keith-Magee
46cd8bb5b6
Fixed #7143 -- Modified the test client to better match (most) real browser behavior when uploading files. Now, only the file name is sent, rather than the full path. Thanks for the report, cpinto.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7577 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-06 13:39:42 +00:00
Russell Keith-Magee
d234e92740
Fixed #6168 -- Updated the Django system test runner to make it possible to run the invalid_models test (and any other invalid_ test) explicitly, rather than just as part of the full suite. Thanks for tracking down the problem, Eric Florenzano.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-06 12:55:38 +00:00
Russell Keith-Magee
ed1c21171c
Fixed #7366 -- Modified a few expected test outputs to remove the dependency on dictionary ordering. Thanks for the patch, Leo Soto.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-06 11:47:47 +00:00
Jacob Kaplan-Moss
1452d46240
Fixed #6886 : Tightened up ForeignKey and OneToOne field assignment. Specifically:
...
* Raise a ValueError if you try to assign the wrong type of object.
* Raise a ValueError if you try to assign None to a field not specified with null=True.
* Cache the set value at set time instead of just at lookup time.
This is a slightly backwards-incompatible change; see BackwardsIncompatibleChanges for more details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-05 00:39:32 +00:00
Jacob Kaplan-Moss
08d468db92
Fixed a messy test case (regressiontests/templates/loaders) that could cause future tests to fail by not cleaning up after itself.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7567 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-30 23:24:23 +00:00
Russell Keith-Magee
d53e8f1285
Fixed #6430 -- Corrected the loading of templates from eggs, which was broken by the unicode merge. Thanks for the excellent report and patch, Juan Manuel Caicedo <juan.manuel.caicedo@gmail.com>.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-29 13:11:23 +00:00
Russell Keith-Magee
5837a45bd9
Fixed #7173 -- Corrected the caching of objects in reverse OneToOne relationships. Thanks, Travis Terry.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7561 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-29 12:17:03 +00:00
Adrian Holovaty
14d6ee2dc9
Changed Query.get_columns() to quote the 'AS' column names in an extra_select situation, to match pre-queryset-refactor behavior. Added unit tests that verify this and provide an example
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 21:15:05 +00:00
Ian Kelly
13a6fd61c6
Renamed a field in the queries test schema that was preventing the tests from running in Oracle. I've opened #7109 to address the general problem. Refs #7109
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 17:31:08 +00:00
Malcolm Tredinnick
ff6e529502
Added a test to demonstrate the remaining problem in #7095 .
...
Only fails for MySQL (because they've made some interesting syntax choices).
Refs #7095 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 11:51:16 +00:00
Malcolm Tredinnick
e07a457c00
Fixed #7096 -- The simplifications in [7461] weren't complete. They broke
...
multi-component exclude() calls. Fixed that.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 04:29:06 +00:00
Malcolm Tredinnick
356dfd5308
Fixed #7098 -- Old-style related-model order_by() syntax was being incorrectly
...
marked as erroneous. It's just more dangerous and risky, not forbidden. This
commit restores backwards compatibility there.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7490 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 02:27:19 +00:00