| Age | Commit message (Collapse) | Author |
|
settings.
An ImproperlyConfigured exception will be raised they mismatch.
Backport of 1c58cabad7 and a2cd0e12c9 from master
|
|
Several database backends struggle with binary data. This change
minimizes the risk of unrelated tests failures when binary fields
trigger errors.
|
|
Backport of c70a61eb from master
|
|
This reduces the number of explicit vendor checks.
Backport of d6672631 from master
|
|
Thanks intgr for the report.
This commit doesn't include a test because I don't know how to emulate a
database disconnection in a cross-database compatible way.
Also simplified a 'backends' test that was constrained by this problem.
Backport of 81761508 from master
|
|
Backport of 5f2f47f from master
|
|
Thanks Piotr Kasprzyk for help with the patch.
|
|
allows_auto_pk_0.
MySQL does allow primary key with value 0. It only forbids autoincrement
primary key with value 0.
Thanks Claude Paroz for the report.
|
|
|
|
This commit touchs various parts of the code base and test framework. Any
found usage of opening a cursor for the sake of initializing a connection
has been replaced with 'ensure_connection()'.
|
|
Updated SQLUpdateCompiler.execute_sql to match the behavior described in
the docstring; the 'first non-empty query' will now include all queries,
not just the main and first related update.
Added CURSOR and NO_RESULTS result_type constants to make the usages more
self documenting and allow execute_sql to explicitly close the cursor when
it is no longer needed.
|
|
It contained models, forms and admin objects causing undesirable
import side effects. Refs #16368.
Thanks to Ramiro, Carl and Loïc for the review.
|
|
Fixed #21452 again.
Forward-port of 18d75e07 from stable/1.6.x.
|
|
|
|
|
|
When settings.DATABASES['default']['AUTOCOMMIT'] = False, the connection
wasn't in autocommit mode but Django pretended it was.
Thanks Anssi for analysing this issue.
Refs #17062.
|
|
This test could change settings.DATABASES['default']['TIME_ZONE'] and
didn't restore the previous value.
|
|
|
|
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
|
|
|
The import was done from util instead of utils leading to
PendingDeprecationWarning.
|
|
|
|
Thanks PaulM for the suggestion and Luke Granger-Brown and
Wiktor Kołodziej for the initial patch.
|
|
|
|
Thanks hogbait for the report.
|
|
Thanks malte for the report.
|
|
The documentation and comments now all use 'an' to
refer to the word SQL and not 'a'.
|
|
|
|
Thanks thibaultj for the report, jenh for the patch,
and charettes for the tests.
|
|
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
|
|
It doesn't work as one might expect on a certain database backend where
autocommits_when_autocommit_is_off = True. That backend happens to be
popular for running tests.
|
|
One import per line please! Refs #20680.
|
|
Thanks reames at asymmetricventures.com for the report.
|
|
Add support for Oracle, fix an issue with the repr of RawQuerySet,
add tests and documentations. Also added a 'supports_paramstyle_pyformat'
database feature, True by default, False for SQLite.
Thanks Donald Stufft for review of documentation.
|
|
|
|
Fixed #20483.
|
|
|
|
Gives much nicer errors when it fails.
|
|
Add "FROM DUAL" to SQL selecting constants in tests for Oracle.
|
|
Thanks nebstrebor for the report and antofik for the patch.
|
|
Queries can contain binary data undecodable with utf-8. In this
case, using the 'replace' errors mode when decoding seems like
an acceptable representation of the query.
Thanks Marcel Ryser for the report.
|
|
Previously, depending on the database backend or the cursor type,
you'd need to double the percent signs in the query before passing
it to cursor.execute. Now cursor.execute consistently need percent
doubling whenever params argument is not None (placeholder substitution
will happen).
Thanks Thomas Güttler for the report and Walter Doekes for his work
on the patch.
|
|
|
|
|
|
|
|
For users who didn't activate autocommit in their database options, this
is backwards-incompatible in "non-managed" aka "auto" transaction state.
This state now uses database-level autocommit instead of ORM-level
autocommit.
Also removed the uses_autocommit feature which lost its purpose.
|
|
creating constraints on the intermediary models.
|
|
|
|
|