Commit Graph

1184 Commits

Author SHA1 Message Date
Jannis Leidel 479f2bce3c Removed duplicate entry in introspection PostgreSQL db backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-13 20:15:04 +00:00
Karen Tracey 13efd10465 Refs #16234: Avoid GenericIPAddressField clobbering Field default_error_messages dict.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16390 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-13 04:31:56 +00:00
Jannis Leidel ce3c281090 Fixed #811 -- Added support for IPv6 to forms and model fields. Many thanks to Erik Romijn.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-11 13:48:24 +00:00
Ramiro Morales c43d15b3b3 More removal of poorly legible constructs to workaround Python 2.4 shortcomings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 18:43:29 +00:00
Ramiro Morales dff31de20a Fixed #16155 -- Removed Python 2.4 compatibility constructs from code and mentions from docs. Thanks Aymeric Augustin for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-09 20:01:28 +00:00
Andrew Godwin 865d684a8a Fixed #8913 - Make "must be unique" error messages customisable. Thanks to Leah Culver.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16345 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-09 15:05:13 +00:00
Alex Gaynor fcf8312ade Made clear() on a reverse foreign key significantly more efficient. Thanks to Andrew Godwin for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-07 20:51:59 +00:00
Luke Plant de3b58d626 Fixed #15776 - delete regression in Django 1.3 involving nullable foreign keys
Many thanks to aaron.l.madison for the detailed report and to emulbreh for
the fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-30 16:04:25 +00:00
Ramiro Morales a8598c7de2 Fixed #11789 -- Fixed aggregates so it interacts with QuerySet none() in a way consistent with other empty query sets. Thanks alexr for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-21 16:54:25 +00:00
Ramiro Morales 15793309e1 Fixed #14476 -- Fixed resolution of automatically generated annotation names so e.g. filtering based on them works. Thanks dirleyls for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16252 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-21 13:12:23 +00:00
Ramiro Morales 07bfc76ecf Fixed #15790 -- Fixed QuerySet only() and defer() methods behavior with proxy models. Thanks Michal Modzelewzki for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-15 00:56:01 +00:00
Luke Plant 724c84fe90 Fixed #13648 - '%s' escaping support for sqlite3 regression.
Thanks to master for the report and initial patch, and salgado and others
for work on the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-10 12:20:47 +00:00
Luke Plant 385ae343fb Fixed #15709 - Duplicated group_by condition
Thanks to ziangsong for report, and to mk for the patch

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-07 19:02:51 +00:00
Luke Plant db5807bdb1 Fixed #15823 - incorrect join condition when combining Q objects
Thanks to dcwatson for the excellent report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16159 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-05 20:26:26 +00:00
Jannis Leidel 48cffd9e45 Fixed #5931 -- Added __repr__ to db fields. Thanks, Thomas Güttler, emulbreh and magopian.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-03 11:51:37 +00:00
Jannis Leidel 18d2f4a816 Fixed #5833 -- Modified the admin list filters to be easier to customize. Many thanks to Honza Král, Tom X. Tobin, gerdemb, eandre, sciyoshi, bendavis78 and Julien Phalip for working on this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16144 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-03 10:44:23 +00:00
Carl Meyer 2706fdbc87 Refs #15093 -- Fixed another get_models call missed in r16053. Thanks Luke for catching it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16108 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-27 17:51:43 +00:00
Carl Meyer c85b765288 Fixed #15903 -- Allowed not-installed models to still be referenced in related fields. Missed case from r16053.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-27 15:46:43 +00:00
Jannis Leidel c77372cad0 Fixed #14729 -- RawQuerySet.__repr__ fails when params passed as list. Thanks, intgr for ticket and accuser for patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 18:17:26 +00:00
Jacob Kaplan-Moss 5b0e4e49d4 Fixed #14091 - be more correct about logging queries in connection.queries.
Thanks to Aymeric Augustin for figuring out how to make this work across
multiple databases.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:14:54 +00:00
Jannis Leidel a845eba8dd Fixed #11283 -- Made sure that latest() clears previously specified ordering in a QuerySet. Thanks to benmoran, punteney, mk and and Julien Phalip.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16067 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:02:07 +00:00
Jacob Kaplan-Moss 8f0f73c7b8 Fixed #2705: added a `select_for_update()` clause to querysets.
A number of people worked on this patch over the years -- Hawkeye, Colin Grady,
KBS, sakyamuni, anih, jdemoor, and Issak Kelly. Thanks to them all, and
apologies if I missed anyone.

Special thanks to Dan Fairs for picking it up again at the end and seeing this
through to commit.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-20 20:42:07 +00:00
Carl Meyer 6bdaef26ec Fixed #15866, #15850 -- Prevented get_model() and get_models() from returning not-installed models (by default). Thanks adsva for report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16053 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-20 17:58:37 +00:00
Ian Kelly b4c83138e9 Fixed #15534: Made the Oracle runtime test for regex capabilities use the !DatabaseOperations connection instead of grabbing the default connection.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-18 21:59:20 +00:00
Ian Kelly d3c08fd813 Fixed #15573: Forced the default site id to be 1 when creating test databases, to prevent a large number of errors when running the tests using the oracle backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16027 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-15 21:49:22 +00:00
Adrian Holovaty 3b6c5e5eb2 Made some negligible docstring fixes while I was poking around in the depths of query.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-11 21:48:47 +00:00
Adrian Holovaty d546179c71 Fixed incorrect usage of its in query.py docstring
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16024 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-11 20:27:53 +00:00
Ramiro Morales 30b3d51599 Fixed #13630 -- Made __init__ methods of all DB backends' DatabaseOperations classes take a `connection` argument. Thanks calexium for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-05 00:19:17 +00:00
Adrian Holovaty 21877c39b4 Fixed #15743 -- Fixed tense in a docstring in db/models/base.py. Thanks, jMyles
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16006 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 21:46:28 +00:00
Russell Keith-Magee eea43f2458 Removed deprecated XMLField.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15982 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:39:52 +00:00
Russell Keith-Magee 8911754555 Deprecated the psycopg-based postgresql database backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:39:08 +00:00
Russell Keith-Magee f9972bcf86 Removed deprecated DB backend functions for creating m2m tables.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15979 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:38:25 +00:00
Alex Gaynor 9b3aaae255 Removed legacy handing for `settings.DATABAS_*` and using short-form references to the included database backends.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30 17:59:44 +00:00
Alex Gaynor e57cc90c16 Removed deprecated legacy connection handling for `Field.get_db_*`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15958 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30 17:48:42 +00:00
Russell Keith-Magee 728770a5f9 Fixed #15702 -- Corrected problem in test suite introduced by Python 2.4 changes from r15927. Thanks to mk for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15937 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 14:22:48 +00:00
Alex Gaynor e54c0a0c94 Move the Python 2.5 specific tests out of their own special files now that 2.5 is the default. Also add __futre__ import where necessary.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 05:58:43 +00:00
Adrian Holovaty 579eb97961 Simplified sqlite backend ImproperlyConfigured check now that we don't support Python 2.4
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:27:05 +00:00
Adrian Holovaty 13864703bc Removed a bunch more Python 2.4 workarounds now that we don't support that version. Refs #15702 -- thanks to jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:11:19 +00:00
Adrian Holovaty 15295a852f Fixed #15647 -- Changed in_bulk() not to type check its input, which now allows for passing any iterable. Thanks, calvinspealman
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-26 17:50:10 +00:00
Adrian Holovaty 6091f0ead3 Fixed #15621 -- Fixed potentially confusing error message in db backend loading. Thanks, keegan_csmith
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-17 16:57:37 +00:00
Adrian Holovaty ad55bb0f87 Changed django/db/utils.py load_backend() to call sorted() instead of .sort(). Saves us a line of code. Taken from patch for #15621
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-16 04:26:38 +00:00
Jacob Kaplan-Moss fd2f18008c Fixed #14733: no longer "validate" .raw() queries.
Turns out that a lot more than just SELECT can return data, and this list is
very hard to define up front in a cross-database manner. So let's just assume
that anyone using raw() is at least halfway competant and can deal with
the error messages if they don't use a data-returning query.

Thanks to Christophe Pettus for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14 19:49:53 +00:00
Adrian Holovaty e494f88be0 Fixed #15601 -- Corrected a weird typo. Thanks, jMyles
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14 05:45:55 +00:00
Adrian Holovaty 72c5733869 Fixed #15604 -- Changed django.db.models.permalink to use wraps() so that it doesn't eat the docstring. Thanks for the report, sfllaw. Also added tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15798 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14 05:22:39 +00:00
Luke Plant 0a3aae8362 Fixed #15559 - distinct queries introduced by [15607] cause errors with some custom model fields
This patch just reverts [15607] until a more satisfying solution can be
found.

Refs #11707

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-10 01:15:19 +00:00
Ian Kelly 23103bddb9 Fixed another case-sensitivity bug in Oracle introspection. This one was harmless, but it was causing an irritating test failure.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-09 22:45:20 +00:00
Ian Kelly 5a79b55239 Fixed a case-sensitivity bug in Oracle introspection that was preventing inspectdb from identifying foreign keys.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-09 19:40:44 +00:00
Ian Kelly d9e61a435a Added a skip for a test that fails in Oracle. Unlike other backends, Oracle does not allow duplicate rows where there is a unique_together constraint for which some but not all of the columns are NULL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15777 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-08 22:41:25 +00:00
Russell Keith-Magee b7c41c1fbb Fixed #12252 -- Ensure that queryset unions are commutative. Thanks to benreynwar for the report, and draft patch, and to Karen and Ramiro for the review eyeballs and patch updates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 13:51:54 +00:00
Russell Keith-Magee d1290b5b43 Fixed #3094 -- Accelerated deprecation of XMLField, since it hasn't served any useful purpose since oldforms. Thanks to PaulM for driving the issue and providing the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 13:28:20 +00:00
Luke Plant 6902824ac2 Fixed #11707 - limit_choices_to on a ForeignKey can render duplicate options in formfield
Thanks to Chris Wesseling for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21 14:03:59 +00:00
Russell Keith-Magee 563a164c05 Fixed #15336 -- Silenced a warning about the DATABASES transition when a database backend isn't specified. Thanks to Ivan Sagalaev for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15571 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-19 08:10:19 +00:00
Russell Keith-Magee 670f4d9628 Fixed #15327 -- Modified the Oracle test database signature method to allow for the case where TEST_USER is unspecified. Thanks to depaolim for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-19 07:41:17 +00:00
Russell Keith-Magee 756f1c218d Fixed #15293 -- Updated the dummy backend to support the APIs introduced by r15493. Thanks to mp for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-14 00:07:09 +00:00
Russell Keith-Magee 7e46b17000 Fixed #15297 -- Corrected an attribute naming regressoin from fixing #9964. Thanks to leonov for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-14 00:06:52 +00:00
Russell Keith-Magee c40a1d1835 Removed more redundant code from the debug cursor wrapper. Thanks to Ramiro for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 23:50:39 +00:00
Russell Keith-Magee e3a2fef7cc Fixed #15289 -- Removed a redundant __getattr__ implementation from the debug SQL cursor wrapper. Thanks to Apollo13 for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 23:38:50 +00:00
Russell Keith-Magee 492b8a0821 Fixed #13987 -- Ensure that the primary key is set correctly for all models that have concrete-abstract-concrete inheritance, not just the first model. Thanks to Aramgutang for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 15:07:27 +00:00
Russell Keith-Magee 6314a1b42e Fixed #9964 -- Ensure that all database operations make transactions dirty, not just write operations. Many thanks to Shai Berger for his work and persistence on this issue.
This is BACKWARDS INCOMPATIBLE for anyone relying on the current behavior that allows manually managed read-only transactions to be left dangling without a manual commit or rollback.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 13:03:34 +00:00
Russell Keith-Magee d1cd53d9cf Changeset r15232 refactored transactions so that all transaction state is maintained on the connection. This changeset continues that work, moving all transaction control to the connection, too. The transaction control functions in django.db.transaction are left as a generic way to easily apply a transaction control function based on a DB alias. Refs #9964.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15492 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 13:02:42 +00:00
Russell Keith-Magee 337a6bc0f6 Fixed #15283 -- Made a minor performance tweak to __iter__. Thanks to lanyjie for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15491 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 05:23:41 +00:00
Russell Keith-Magee d3b38d578f Fixed #13815 -- Ensure that reverse exclude lookups on nullable foreign keys exclude null values. Thanks to bpeschier for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15458 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-08 14:06:02 +00:00
Russell Keith-Magee 340eaded4e Fixed #15116 -- Strip ordering clause from in_bulk() queries, since ordering information will be lost. Thanks to lamby for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-08 14:05:38 +00:00
Alex Gaynor 5718a678e5 Fixed #15230 -- added some more attributes to the dummy database backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-06 18:46:40 +00:00
Ramiro Morales dc5f2607de Fixed #15029 -- Moved to database backends the ability to decide if two DATABASES items are different when creating temporary databases for tests.
hG: Enter commit message.  Lines beginning with 'HG:' are removed.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-02 14:02:14 +00:00
Russell Keith-Magee 74d485c4ec Fixed #15170 -- Skip the inspectdb test under MySQL/MyISAM, because it can't differentiate a foreign key from an integer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01 14:42:52 +00:00
Luke Plant c24bdf044b Fixed #15103 - SuspiciousOperation with limit_choices_to and raw_id_fields
Thanks to natrius for the report.

This patch also fixes some unicode bugs in affected code.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-28 14:08:25 +00:00
Alex Gaynor 7c0e40534b Fixed #15173 -- fixed the tests when run under pypy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-27 00:00:32 +00:00
Carl Meyer 84291b7b84 Fixed #15161 - Corrected handling of ManyToManyField with through table using to_field on its ForeignKeys. Thanks to adehnert for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15330 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-26 19:10:08 +00:00
Carl Meyer 33c155679c Fixed Python 2.4 incompatibility introduced in r15249.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15329 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-26 18:20:19 +00:00
Carl Meyer a9b4f2a400 Tweaked r15303 to avoid O(N) lookup of field name. Thanks to Alex's eagle eyes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-26 08:39:30 +00:00
Carl Meyer 00e7a571c5 Fixed #6456 - Excised FileField file deletion to avoid data loss. Thanks to durdinator for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-26 07:46:19 +00:00
Alex Gaynor 80287f1e8a Fixed #13159 -- properly quote aggregates in order_by.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15318 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-26 03:48:15 +00:00
Alex Gaynor 91414c4bb8 Fixed #13206 -- call super().__init__() in Model.__init__ to allow mixins to do things there.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15317 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-26 03:42:31 +00:00
Carl Meyer 227c5e80db Fixed #11319 - Added lookup support for ForeignKey.to_field. Also reverted no-longer-needed model formsets workaround for lack of such support from r10756. Thanks Russell and Alex for review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15303 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-25 03:14:28 +00:00
Ian Kelly 91c61c0baa Fixed #14149: Initialize the Oracle connection.operators at connection time since some systems don't seem to like the "TRANSLATE" trick.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15299 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-24 21:34:18 +00:00
Carl Meyer 93a4d46184 Fixed #14672 - Added admin handling for on_delete=PROTECT. Thanks to jtiai for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-20 00:33:32 +00:00
Carl Meyer e01cb07404 Fixed #14896 -- Ensured that _meta.get_all_related_objects(include_hidden=True) also works correctly with model inheritance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-19 21:56:14 +00:00
Carl Meyer 621f48086e Fixed #15118 - Corrected the deletion-ordering for inherited models.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-19 20:11:56 +00:00
Alex Gaynor a38da1ae0d Avoid doing quadratic amounts of work during object deletion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15243 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-19 14:39:54 +00:00
Russell Keith-Magee b31a1b9926 Refs #14661 -- Clarified the handling of initial data injected via custom SQL.
This is BACKWARDS INCOMPATIBLE CHANGE for anyone relying on SQL-injected initial data in a test case.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-18 16:43:01 +00:00
Alex Gaynor fcbf881d82 Refactor all uses of thread locals to be more consistant and sane.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-17 09:52:47 +00:00
Russell Keith-Magee ae8ff5f476 Fixed #14707 -- Relax the protections on aggregate naming collisions when a ValuesQuerySet removes the colliding name. Thanks to Andy McKay for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-16 08:03:25 +00:00
Alex Gaynor 92d4352283 Cleaned up the ORM slightly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15203 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-14 05:04:14 +00:00
Ramiro Morales e1ede214e6 Fixed #13668 -- Corrected database router methods invocation for ManyToMany fields without through models. Thanks craig.kimerer for the report and David Gouldin for the fix.
This also adds tests for r14857.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-13 04:11:41 +00:00
Alex Gaynor f544d98896 2 small optimizations: a) move an import out of a function, b) remove a cache that did nothing, tiny tiny speed up on CPython, but a big one on PyPy
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15175 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-12 13:39:31 +00:00
Alex Gaynor 29de7ee9cb Fixed #11293 -- fixed using Q objects to generate ORs with aggregates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-11 01:00:50 +00:00
Andrew Godwin ea774bf9a7 Fix wrong attribute name in [15156]. Thanks to Alex Gaynor for spotting this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-10 13:44:35 +00:00
Ramiro Morales 730769d1af Fixed #14951 -- Made the unique_for_{date,month,year} model field constraints to not fail when the related DateField is empty.
Existing modelforms tests were extended to cover this case and an equivalent set of tests was added for the model functionality.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-09 13:26:39 +00:00
Andrew Godwin 81e05a418d Fixed #9029 -- Allow use of fieldname_id with get_or_create. Thanks to aaron and mrmachine.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-08 13:27:30 +00:00
Russell Keith-Magee dc25fa776a Fixed #15006 -- Removed some stray tabs in python code. Thanks to vanschelven for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-03 13:19:59 +00:00
Karen Tracey b1f6a4d66f Fixed #10154: Allow combining F expressions with timedelta values.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15018 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-22 03:34:04 +00:00
Luke Plant 363177ea32 Small performance tweak - avoid loading django.core.management in DB backend code
django.core.management (and dependencies) will usually not be needed in a web context.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15012 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21 21:32:59 +00:00
Russell Keith-Magee 673e6fc7fb Fixed #11675 -- Added support for the PyLibMC cache library. In order to support this, and clean up some other 1.3 caching additions, this patch also includes some changes to the way caches are defined. This means you can now have multiple caches, in the same way you have multiple databases. A huge thanks to Jacob Burch for the work on the PyLibMC backend, and to Jannis for his work on the cache definition changes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15005 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21 15:19:19 +00:00
Ramiro Morales c2657d8923 Fixed #14921 -- Tweak changes made in r14861 for the Oracle backend so the test runner can actually create the test DB. Thanks Karen for the report.
In Oracle, the name of a DB as handled by Django hasn't a counterpart anyway. So use the 'production DB name' as it was done before.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14993 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21 01:36:09 +00:00
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