Malcolm Tredinnick
19c7db0058
Fixed #7853 -- Fixed another case of deleting inherited models with foreign key
...
references. Thanks to Russell for the test case that demonstrated the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8128 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-28 01:32:46 +00:00
Gary Wilson Jr
9a5301ccbc
Made the Paginator class a bit more backwards compatible with the lecacy `ObjectPaginator` class by using the `ObjectPaginator`'s `_get_count` method. Instead of explicitly checking for an instance of `QuerySet`, this now allows any object with a `count()` or `__len__()` method defined to be passed to Paginator. For one, this is useful when you have custom `QuerySet`-like classes that implement a `count()` method but don't inherit from `QuerySet` explicitly.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 23:01:55 +00:00
Gary Wilson Jr
66d5018dd1
Corrected wording in comment.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 19:05:54 +00:00
Malcolm Tredinnick
82a85fdbae
Fixed #6427 -- Added some more features to the Austrian localflavor.
...
Thanks, Horst Gutmann.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 18:54:56 +00:00
Malcolm Tredinnick
ce15b389c1
Fixed the admin_scripts tests to check for the right output with Python 2.4.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8108 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 18:25:06 +00:00
Malcolm Tredinnick
4fee39c63c
Fixed #7872 -- Fixed a missed case of promoting table joins when using
...
disjunctive filters. Thanks to Michael Radziej for the failing test case.
problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 18:16:17 +00:00
Russell Keith-Magee
12eba9efc1
Removed some model saves from [8102] which were causing test failures under Postgres. Thanks to Ramiro Morales for the report (via IRC).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 13:55:35 +00:00
Russell Keith-Magee
661f62be3c
Fixed #7913 -- Corrected backwards incompatible parts of [7977] when optgroup handling was added to field choices (Ticket #4412 ). Thanks to Michael Elsdorfer (miracle2k) for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8102 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 07:22:39 +00:00
Malcolm Tredinnick
3cbe73692e
Fixed #7778 -- Fixed a tricky case of foreign key clearing with inherited
...
models. Patch from James Murty.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8100 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 04:18:52 +00:00
Malcolm Tredinnick
ccab4b041b
Fixed #7981 -- Wrap the manual transaction management in the
...
serializers_regress tests in some "try...finally" blocks. Patch from Leo Soto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 03:32:44 +00:00
Malcolm Tredinnick
f48855178d
Fixed #7530 , #7716 -- When using select_related() and encountering a NULL
...
related object, populate the attribute correctly. Patch from Bastien Kleineidam.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 01:18:23 +00:00
Malcolm Tredinnick
aee55ce524
Changed one of the model_formsets tests to be immune to the differences in the
...
natural collation ordering used by different databases (normally, this test
would fail on PostgreSQL, but not because the code was incorrect). This is
purely a test tweak.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 01:18:18 +00:00
Malcolm Tredinnick
103d484807
Fixed #7658 -- Added some Windows-specific tempfile handling. The standard
...
stuff doesn't work with the way Django's file uploading code wants to operate.
Patch from Mike Axiak.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 22:48:51 +00:00
Malcolm Tredinnick
e29aece743
Fixed #4534 -- Added an "else" option to the "ifchanged" template tag.
...
Patch from SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8095 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 22:09:43 +00:00
Russell Keith-Magee
eca3c7d3d6
Added an ordering definition to make test output reliable across database backends.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 14:49:39 +00:00
Malcolm Tredinnick
108b604b51
Fixed #7345 -- When normalising the URLField form field, attach a trailing
...
slash when only a host (no path) is given. Thanks, jpwatts.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 05:18:39 +00:00
Malcolm Tredinnick
a26ba33111
Fixed #7686 -- Added an Austrian localflavor. Thanks, bernd.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 04:25:42 +00:00
Malcolm Tredinnick
fe240b18f6
Removed some completely pointless test changes from [8084], since they were
...
already being tested. Thank, Marty. /me is dumb. :-(
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8085 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 04:10:40 +00:00
Malcolm Tredinnick
6f16b5bad2
Fixed #7967 -- Make sure the __contains__ method in the cache backends call the
...
right has_key() method for the subclass. Patch from Marty Alchin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 03:58:31 +00:00
Malcolm Tredinnick
f49c5c23f9
Fixed #7574 -- Fixed the handling of lazy translation in email headers.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8083 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 03:37:25 +00:00
Gary Wilson Jr
b149e3d9e7
Corrected typo.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8082 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 03:31:22 +00:00
Jacob Kaplan-Moss
7b3cf13d32
Improved admin model registration options: you can now register using register(Model, **options) and even register(Model, ModelAdmin, **options). This isn't documented yet -- a much expanded version of docs/admin.txt is on the way.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8063 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 18:58:06 +00:00
Malcolm Tredinnick
a7b556ca04
Allow for matches against unsaved objects in querysets (which will therefore
...
match nothing). This allows for some more straightforward code in the admin
interface.
Fixed #7488 (all the debugging there was done by Brian Rosner, who narrowed it
down to the item in this patch).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8061 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 06:12:15 +00:00
Brian Rosner
3912403550
Added the ability to customize the prefix value on an inline formset. Fixes #7899 . AThanks for the tip Peter of the Norse.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 04:46:31 +00:00
Malcolm Tredinnick
681e7bbd25
Removed some potentially misleading code (it isn't executed) after the changes
...
in [8055]. Thanks, Karen. Refs #7745 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8059 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 04:41:53 +00:00
Brian Rosner
9d8f41baac
Made the semi-private _max_form_count live on the public API of formsets by renaming it to max_num. This also removes the ManagementForm use of MAX_COUNT since that usage should just be referenced to the formset's max_num property. Refs #7899 . Thanks Peter of the Norse for straightening me out.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 04:28:52 +00:00
Russell Keith-Magee
437945146d
Fixed #7906 -- Modified admin_scripts regression test to use the same python executable that is running the test suite, rather than using 'python' on the path. Thanks to Chris Hasenpflug for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8056 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 03:00:50 +00:00
Malcolm Tredinnick
c5a76a3669
Fixed a bunch of Python 2.3 test failures.
...
All remaining buildbot failures on 2.3 are not due to the test suite, as far as
I can work out.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8055 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22 19:48:36 +00:00
Malcolm Tredinnick
d1ea8b2842
Changed the test from [8052] so that it is insensitive to whether a database
...
sorts NULLs first or last in a sequence or results.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8054 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22 18:56:50 +00:00
Malcolm Tredinnick
8745beccb1
Fixed #7813 -- Allow pickling of Query classes that use select_related().
...
Based on a patch from Justin Bronn.
The test in this patch most likely breaks on Oracle. That's another issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8053 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22 08:23:20 +00:00
Malcolm Tredinnick
83e97ecf88
Fixed #7791 -- Fixed a really silly error I introduced in [7926]. :-(
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22 07:37:09 +00:00
Malcolm Tredinnick
0e9587fd6b
Fixed the tests from [8033] to work for the PostgreSQL backends (the primary
...
key value isn't guaranteed to be the same across all backends). Still some
breakage on MySQL because of the way it treats booleans, but that's another
issue.
Refs #6755 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8051 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22 05:15:40 +00:00
Adrian Holovaty
8bc442e771
Fixed #7304 -- Gave AnonymousUser a has_perms() method, which it was lacking
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22 03:05:40 +00:00
Jacob Kaplan-Moss
863f4eb1d7
Fixed #6755 : model inheritance now works in the admin. Thanks, sloonz and Michael Placentra.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8033 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22 01:10:06 +00:00
Luke Plant
384a721e1c
Fixed #7825 - modeltests/delete tests failing after NFA merge, and improved documentation of these tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 17:28:21 +00:00
Jacob Kaplan-Moss
970611827b
FIxed #7666 : use a bare queryset when accessing single related objects so that the related objects never become inaccessible.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 15:41:21 +00:00
Russell Keith-Magee
4016d5264a
Fixed #7727 -- Improved the checks for import failure when using PIL. Under PyPy, you can import the PIL module, but when you try to use it, the underlying _imaging module will not be available. Thanks to Maciej Fijalkowski (fijal) for the report and suggested fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 11:52:11 +00:00
Malcolm Tredinnick
bfcecbffd3
Changed/fixed the way Django handles SCRIPT_NAME and PATH_INFO (or
...
equivalents). Basically, URL resolving will only use the PATH_INFO and the
SCRIPT_NAME will be prepended by reverse() automatically. Allows for more
portable development and installation. Also exposes SCRIPT_NAME in the
HttpRequest instance.
There are a number of cases where things don't work completely transparently,
so mod_python and fastcgi users should read the relevant docs.
Fixed #285 , #1516 , #3414 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 07:57:10 +00:00
Gary Wilson Jr
80ac41e2f7
Corrected typo.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 03:50:40 +00:00
Russell Keith-Magee
d911a64ce8
Fixed #6450 -- Improved the checking of errors when creating the directories for saved files. Thanks to henry@precheur.org for the report and patch, and vung for the excellent test case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8007 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-20 12:44:41 +00:00
Russell Keith-Magee
6db9fd0116
Made the test case for doctest comparison of XML fragments a little more rigorous. Refs #7441 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8005 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-20 08:47:10 +00:00
Russell Keith-Magee
b58de15139
Fixed #7339 -- Added manual calls to the garbage collector. This is required for PyPy and Jython; these implementations don't use reference counting, so you can't rely on __del__ being run immediately after del is called. Thanks to Maciej Fijalkowski (fijal) and Leo Soto.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8004 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-20 06:32:54 +00:00
Russell Keith-Magee
2f49d18071
Fixed #7441 -- Removed some of the shortcuts in the doctest output comparators, and added a wrapper to allow comparison of xml fragments. Thanks to Leo Soto for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-20 05:46:41 +00:00
Malcolm Tredinnick
5141b67a19
Reverted [7986].
...
It turns out that we need to treat filename creation/display (in
particular, the upload_to path) differently depending upon whether the value is
out of the database or provided by other code and there's no reliable way to
determine that at the moment (although some later proposed changes might alter
that). So calling get_FIELD_filename on an unsaved model with a changed file
attribute will not necessarily return the same result as after the save().
Refs #5619 . Fixed #7843 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7998 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 22:26:32 +00:00
Malcolm Tredinnick
8ac9cbee2f
Fixed #7763 -- Added a Romanian localflavor. Thanks, MihaiD.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:22:44 +00:00
Malcolm Tredinnick
344383284c
Fixed #6009 -- Added regression tests to show that uploading non-ASCII
...
filenames now works properly. Patch from Leah Culver.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 18:47:59 +00:00
Malcolm Tredinnick
a103786971
Fixed #5619 -- Return the same path in get_FOO_filename() before and after a
...
model is saved (i.e. make sure the upload prefix is prepended in both cases).
Patch from wreese@gmail.com . Tests from Leah Culver.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 18:35:11 +00:00
Russell Keith-Magee
0cffff024b
Fixed #7441 - Improved the doctest OutputChecker to be more lenient with JSON an XML outputs. This is required so that output ordering that doesn't matter at a semantic level (such as the order of keys in a JSON dictionary, or attributes in an XML element) isn't caught as a test failure. Thanks to Leo Soto for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 14:46:55 +00:00
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
Adrian Holovaty
9c53847ef4
Added some tests to modeltests/many_to_one that demonstrate a post-queryset-refactor bug in dates(). Refs #7097
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 00:03:01 +00:00
Malcolm Tredinnick
9c52d56f6f
Merged the queryset-refactor branch into trunk.
...
This is a big internal change, but mostly backwards compatible with existing
code. Also adds a couple of new features.
Fixed #245 , #1050 , #1656 , #1801 , #2076 , #2091 , #2150 , #2253 , #2306 , #2400 , #2430 , #2482 , #2496 , #2676 , #2737 , #2874 , #2902 , #2939 , #3037 , #3141 , #3288 , #3440 , #3592 , #3739 , #4088 , #4260 , #4289 , #4306 , #4358 , #4464 , #4510 , #4858 , #5012 , #5020 , #5261 , #5295 , #5321 , #5324 , #5325 , #5555 , #5707 , #5796 , #5817 , #5987 , #6018 , #6074 , #6088 , #6154 , #6177 , #6180 , #6203 , #6658
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-27 02:50:16 +00:00