Jannis Leidel
88ff656731
Fixed #12955 -- Use the size attribute of the file instead of len() to support uploads larger than 2GB. Thanks, swiedenroth and isagalaev.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14878 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:54:22 +00:00
Ramiro Morales
e0d8c5fca2
Fixed error introduced in r14666 that results in the message reporting the test DB name to be created being shown actually after the real action when the operation fails.
...
Implemented that by factoring out calculation of test DB name to an internal method.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-08 23:48:28 +00:00
Alex Gaynor
a4898dc50b
Fixed the world's ugliest syntax (that's not an actual error) that snuck in with [14857].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-08 18:37:00 +00:00
Alex Gaynor
2a46323124
Fixed #14870 -- don't catch AttributeErrors in database router methods, instead check that the method itself exists. Thanks to jonash for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-08 18:31:57 +00:00
Ian Kelly
b8c368feb2
Replaced an ImportError with ImproperlyConfigured in the Oracle backend.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14855 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-08 07:56:43 +00:00
Russell Keith-Magee
52c77803d2
Normalized the name order of arguments. There's no actual bug here, other than potential confusion for anyone reading the code. Thanks to Aram Dulyan for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14796 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 05:59:38 +00:00
Alex Gaynor
d68598e022
Fixed #14700 -- ensure that a raw query is only executed once per iteration.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-03 20:25:59 +00:00
Ian Kelly
5475da1c32
Added a regression test for r14781. Also fixed a bug where connection.vendor was effectively always 'unknown', causing all vendor-specific tests to be skipped.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-03 18:15:54 +00:00
Ian Kelly
cbf9d6e0bb
Fixed the Oracle environment variables not getting set correctly under Cygwin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14781 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-03 00:54:39 +00:00
Ian Kelly
1f68dc4ad4
Fixed #11706 : Added an Oracle connection option to disable the use of RETURNING INTO in INSERT statements.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-01 23:36:56 +00:00
Alex Gaynor
21f5dc467e
Fixed a bug in date queries with GIS backends introduced in [14715].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-01 17:53:22 +00:00
Alex Gaynor
678f626c24
Fixed a suite of errors in the ORM -- a) fixed calling values_list().values_list() and changing whether the results are flat, b) fixed an issue with fields on the left-hand side of what becomes the HAVING clause not being included in the GROUP BY clause, and c) fixed a bug with fields from values() calls not being included in the GROUP BY clause. This fixed the recent test failures under postgresql.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-26 14:24:08 +00:00
Luke Plant
073412b411
Fixed #14700 - speed up RawQuerySet iterator.
...
This moves constant work out of the loop, and uses the much faster *args
based model instantiation where possible, to produce very large speed ups.
Thanks to akaariai for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-24 15:26:29 +00:00
Luke Plant
ff7c243b4c
Fixed #14697 - speeded up model instance creation by moving work outside of loops
...
Thanks to akaariai for the report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14687 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-23 13:54:58 +00:00
Alex Gaynor
07ba3220ba
Fixed #14754 -- corrected using an aggregate in an F expressions when that queryset is later used in a subquery. Thanks to master for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-22 18:00:01 +00:00
Honza Král
dc334a2ba8
Fixed #3400 -- Support for lookup separator with list_filter admin option. Thanks to DrMeers and vitek_pliska for the patch!
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14674 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 19:29:15 +00:00
Ramiro Morales
752bd8bf75
Added printing of the name of test database being created/destroyed, at verbosity level 2. Refs #14415 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 17:18:26 +00:00
Ramiro Morales
6774207394
Fixed #14453 -- Changed handling of microseconds part in typecast_timestamp() DB backend helper function to be more correct. Thanks philipn for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14664 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 15:08:53 +00:00
Carl Meyer
9b432cb67b
Fixed #5768 -- Added support for ManyToManyFields and reverse relations in values() and values_list(). Thanks to mrmachine for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14655 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 02:28:25 +00:00
Alex Gaynor
49d831380f
Corrected the way databases were compared. This allows running the test suite with two in memory SQLite databases.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-19 08:08:08 +00:00
Carl Meyer
008f333bac
Fixed pk uniqueness validation for new objects created outside of a ModelForm. Also removed need for ModelForm to poke at Model._state.adding, keeping it an internal ORM concern.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14613 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-18 23:29:58 +00:00
Carl Meyer
38ba3775ec
Fixed #14234 -- Re-validating a model instance added via ModelForm no longer throws spurious PK uniqueness errors. Thanks to David Reynolds and Jeremy Dunck.
...
Also moved Model._adding to Model._state.adding to reduce instance namespace footprint.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-18 22:43:46 +00:00
Alex Gaynor
fc47f8c65a
Fixed #14257 -- removed ManyToManyField.isValidIDList which was completely dead code (unused since magic-removal). Thanks to andrewsk for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 17:00:40 +00:00
Alex Gaynor
0eb31d3dc9
Fixed #14423 -- corrected incorrect SQL being generated when a nullable, inherited field was used in an exclude. Thanks to PhiR_42 for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 16:46:50 +00:00
Ramiro Morales
5666bca678
Fixed #11369 -- Corrected verbose_name_plural model Meta option to be consistent with verbose_name when using abstract model inheritance. Thanks Beetle_B for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 12:09:21 +00:00
Alex Gaynor
4276b5197b
Fixed #12687 -- fixed an issue with aggregates and counts in conjunction with annotations where the QuerySet was provably empty.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 02:57:14 +00:00
Ramiro Morales
f3d0704783
Fixed #14691 -- Made ForeignKey.validate() use the right database. Thanks Marco Paolini for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-16 22:09:13 +00:00
Ian Kelly
87a8046f90
Made the oracle backend throw the same ValueError as the mysql backend when a timezone-aware datetime is passed in. This fixes a datatypes test failure.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 18:39:30 +00:00
Ian Kelly
e0e347c2d3
Fixed a misapplied test skip feature in the oracle backend from r14139.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 17:51:31 +00:00
Ian Kelly
ee6bec6c09
Fixed #11101 : Rewrote the sequence reset SQL for Oracle to prevent it from performing an implicit commit that caused all fixtures to be automatically committed, causing a large number of test failures.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 01:44:22 +00:00
Ramiro Morales
cae746e037
Fixed error introduced in r14512.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11 05:17:31 +00:00
Ramiro Morales
4fb1825e75
Fixed small multi-db compatibility issue in the Oracle backend.
...
Also, converted a couple of constructs to a more Python idiomatic form.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11 05:07:32 +00:00
Ramiro Morales
f91b41fe33
Implemented changes made in r14320 in the Oracle backend. Thanks Russell for reviewing the proposed fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11 04:36:20 +00:00
Carl Meyer
616b30227d
Fixed #7539 , #13067 -- Added on_delete argument to ForeignKey to control cascade behavior. Also refactored deletion for efficiency and code clarity. Many thanks to Johannes Dollinger and Michael Glassford for extensive work on the patch, and to Alex Gaynor, Russell Keith-Magee, and Jacob Kaplan-Moss for review.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-09 16:46:42 +00:00
Ramiro Morales
9c619ac48b
Fixed some Oracle backend test DB creation code bugs.
...
Made saving of modified settings compatible with multi-db, removed dead and superfluous code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14489 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-07 20:58:46 +00:00
Ramiro Morales
59d5537a6c
Fixed #14630 -- Increased maximum size of the Oracle tablespace datafile used for tests from 100MB to 200MB.
...
This allows the execution of the full Django test suite without running out of allocated space.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14468 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-06 04:30:17 +00:00
Alex Gaynor
e2a0de0b93
Fixed a test failure introduced in [14461].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14462 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 16:37:00 +00:00
Alex Gaynor
abaa3ed4bd
Fixed #13935 , added support for using QuerySet.dates across related fields. Thanks to valyagolev for his work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14461 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 16:03:05 +00:00
Alex Gaynor
222c732616
Fixed #10728 -- corrected subclassing of Fields who use the SubfieldBase metaclass. Thanks to G2P and George Sakkis for their work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 18:40:53 +00:00
Alex Gaynor
ed51dd5d64
Avoid an O(n**2) operation where O(n) will suffice. Possibly worth a second or two when running the test suite.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14433 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:41:46 +00:00
Alex Gaynor
fa8f0cb2d8
When looking for django tables which exist, query for all tables once, not once *per table*.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-31 00:53:58 +00:00
Alex Gaynor
c38a174f7c
Remove several uses of the deprecated dict.has_key in favor of the in operator. This is faster, has less code, and is in every single way better.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 04:24:53 +00:00
Russell Keith-Magee
8a724802c5
Fixed #14471 -- Corrected a regression in the use of methods on custom managers on related querysets. Thanks to Lucky for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 12:57:04 +00:00
Russell Keith-Magee
4d5b00b874
Fixed #14517 -- Corrected the exception that is caught when testing for the availability of STDDEV operations. Thanks to agabel for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 02:59:22 +00:00
Alex Gaynor
01e2be557b
Fixed #14550 -- fixed the behavior of commit_on_success to exit the transaction properly. This was a bug introduced in [14288]. Thanks to Justin for the report and Florian Apolloner for help debugging.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-24 17:25:49 +00:00
Ramiro Morales
cfdad9ed86
Fixed #14223 -- Extended unification of exception raised in presence of integrity constraint violations.
...
The unification had been introduced in r12352 and native backend exceptions still
slipped through in cases that end in connection.commit() call. Thanks Alex,
Jacob and Carl for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-23 00:01:22 +00:00
Alex Gaynor
27db9378cf
Fixed #10771 -- added support for using the transaction management functions as context managers in Python 2.5 and above. Thanks to Jacob for help with the docs.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14288 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 19:38:15 +00:00
Ramiro Morales
e1182306fd
Fixed a small typo introduced in r14139.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 00:14:41 +00:00
Chris Beaven
65b98c9b41
Change the stacklevel for Field deprecation warnings to correctly point to the source of the problem
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14220 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-15 02:09:11 +00:00
Ramiro Morales
08d14925c9
Fixed #12192 -- Don't execute any DB query when the QS slicing being performed
...
will result in use of LIMIT 0. Thanks Suor for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-13 23:36:16 +00:00