Jacob Kaplan-Moss
02e56530c5
Fixed #10157 : correctly set the related objects pk when assigning a reverse OneToOne. Thanks, dgouldin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30 22:38:19 +00:00
Malcolm Tredinnick
e94d293504
There are some variations in the printed names of exceptions between Oracle and
...
other database backends, but the exception classes should still be the same.
This commit changes the way the tests check for specific database errors to be
more portable between implementations.
It's possible these tests will still fail if, e.g., Oracle doesn't raise
IntegrityError (but raises DatabaseError) when we except it to, but we can
cross that bridge if and when it appears.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-20 18:50:06 +00:00
Malcolm Tredinnick
220993bcc5
Added savepoint support to the transaction code.
...
This is a no-op for most databases. Only necessary on PostgreSQL so that we can
do things which will possibly intentionally raise an IntegrityError and not
have to rollback the entire transaction. Not supported for PostgreSQL versions
prior to 8.0, so should be used sparingly in internal Django code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 05:34:56 +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
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
Gary Wilson Jr
212ee65be7
Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms `FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05 05:14:46 +00:00
Malcolm Tredinnick
953badbea5
Merged Unicode branch into trunk (r4952:5608). This should be fully
...
backwards compatible for all practical purposes.
Fixed #2391 , #2489 , #2996 , #3322 , #3344 , #3370 , #3406 , #3432 , #3454 , #3492 , #3582 , #3690 , #3878 , #3891 , #3937 , #4039 , #4141 , #4227 , #4286 , #4291 , #4300 , #4452 , #4702
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:11:04 +00:00
Malcolm Tredinnick
4ed82677be
Fixed #2783 -- Fixed one-to-one fields to work with any primary key data type
...
in the related model. Thanks, Joel Heenan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3846 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 02:58:36 +00:00
Russell Keith-Magee
97b9ad73b4
Refs #2333 - Modified runtests script to use new testing framework. Migrated existing tests to use Django testing framework. All the 'othertests' have been migrated into 'regressiontests', and converted into doctests/unittests, as appropriate.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-27 13:59:47 +00:00
Russell Keith-Magee
c81d69354a
Fixed #2217 -- Allowed raw objects to be used in __exact and __in query terms. Existing use of primary keys in query terms is preserved.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 01:14:41 +00:00
Adrian Holovaty
a5b7c29816
Changed all model unit tests to use __str__() instead of __repr__(). Also slightly changed related-object DoesNotExist exception message to use repr instead of str
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-04 00:23:51 +00:00
Adrian Holovaty
0727df90f0
Fixed #1781 -- Fixed unit tests to use new error message for DoesNotExist. Thanks, pb
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 18:36:32 +00:00
Adrian Holovaty
f69cf70ed8
MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00