Loic Bistuer
e1266e50b2
Fixed #21015 -- Fixed MigrationLoader when importlib.import_module returns a file module or an empty directory.
2013-09-06 08:30:19 -04:00
Loic Bistuer
82bbb9fe81
Fixed #21014 -- Fixed gobbled ImportError in MigrationLoader.
2013-09-06 08:30:18 -04:00
Eric Boersma
4d13cc56de
Fixed #21035 -- Changed docs to treat the acronym SQL phonetically.
...
The documentation and comments now all use 'an' to
refer to the word SQL and not 'a'.
2013-09-05 20:14:58 -04:00
Aymeric Augustin
4170b9f402
Tested exc_type instead of exc_value in __exit__.
...
exc_value might be None even though there's an exception, at least on
Python 2.6. Thanks Thomas Chaumeny for the report.
Fixed #21034 .
Forward-port of a8624b2
from 1.6.x.
2013-09-04 16:19:04 -05:00
Loic Bistuer
34d52fd32e
Fixed #21010 -- Changed ModelState to only copy _meta.local_fields.
2013-09-04 14:05:59 -04:00
Aymeric Augustin
868b4c921c
Used six.moves.zip_longest, new in six 1.4.0.
2013-09-02 12:11:16 +02:00
Aymeric Augustin
365c3e8b73
Replaced "not PY3" by "PY2", new in six 1.4.0.
2013-09-02 12:11:02 +02:00
Loic Bistuer
ff9e116198
Fixed #21008 -- Made MigrationWriter handle Promise objects.
2013-08-31 20:26:44 -04:00
Carl Meyer
7211741fc5
Fixed #20999 - Allow overriding formfield class with choices, without subclass restrictions.
...
Refs #18162 . Thanks claudep and mjtamlyn for review.
2013-08-30 17:43:10 -06:00
Simon Charette
11cd7388f7
Fixed #20989 -- Removed useless explicit list comprehensions.
2013-08-30 10:57:51 -04:00
Anssi Kääriäinen
e973ee6a98
Fixed #20988 -- Added model meta option select_on_save
...
The option can be used to force pre 1.6 style SELECT on save behaviour.
This is needed in case the database returns zero updated rows even if
there is a matching row in the DB. One such case is PostgreSQL update
trigger that returns NULL.
Reviewed by Tim Graham.
Refs #16649
2013-08-30 09:41:07 +03:00
Anssi Kääriäinen
13be3bfef1
Removed stale add_q() comment
2013-08-30 09:45:32 +03:00
Tim Graham
c7d0ff0cad
Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()
...
Thanks jeroen.pulles at redslider.net for the suggestion and
helper script.
2013-08-29 12:11:03 -04:00
Tim Graham
f19a3669b8
Fixed #14786 -- Fixed get_db_prep_lookup calling get_prep_value twice if prepared is False.
...
Thanks homm for the report and Aramgutang and lrekucki for work on
the patch.
2013-08-29 11:13:34 -04:00
Claude Paroz
169637649b
Fixed #20984 -- Stopped decoding bytes in sqlite3 adapter on Python 3
...
Thanks lvella at gmail.com for the report.
2013-08-29 08:39:06 +02:00
Andrew Godwin
35230adf63
Python 3 compat fix for callable()
2013-08-23 17:59:35 +01:00
Andrew Godwin
2787de652a
Fix location of tablespace clauses in schema backend column SQL
2013-08-23 14:38:55 +01:00
Andrew Godwin
5569b0b92f
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/backends/oracle/base.py
django/db/backends/postgresql_psycopg2/base.py
django/db/models/signals.py
tests/queries/tests.py
2013-08-23 12:36:53 +01:00
Andrew Godwin
9cc6cfc405
Fix Oracle's default handling and schema-prepared-statement issue
2013-08-23 12:07:55 +01:00
Anssi Kääriäinen
6af05e7a0f
Fixed model.__eq__ and __hash__ for no pk value cases
...
The __eq__ method now considers two instances without primary key value
equal only when they have same id(). The __hash__ method raises
TypeError for no primary key case.
Fixed #18864 , fixed #18250
Thanks to Tim Graham for docs review.
2013-08-22 17:24:07 +03:00
Tim Graham
768bbf3efe
Revert "Fixed #20956 -- Removed useless check in django.db.utils"
...
This reverts commit ce0e86cf76
.
The check is necessary if 'ENGINE' is an empty string.
Thanks apollo13 for pointing this out.
2013-08-22 09:47:17 -04:00
Dima Kurguzov
ce0e86cf76
Fixed #20956 -- Removed useless check in django.db.utils
2013-08-22 08:53:14 -04:00
Anssi Kääriäinen
8d65b6082c
Fixed #20955 -- select_related regression
...
In cases where the same connection (from model A to model B along the
same field) was needed multiple times in a select_related query, the
join setup code mistakenly reused an existing join.
2013-08-22 10:51:07 +03:00
Tim Graham
3f416f6379
Fixed a regression with get_or_create and virtual fields.
...
refs #20429
Thanks Simon Charette for the report and review.
2013-08-21 22:32:04 +01:00
Anssi Kääriäinen
244e2b71f5
Fixed #20946 -- model inheritance + m2m failure
...
Cleaned up the internal implementation of m2m fields by removing
related.py _get_fk_val(). The _get_fk_val() was doing the wrong thing
if asked for the foreign key value on foreign key to parent model's
primary key when child model had different primary key field.
2013-08-21 22:32:04 +01:00
Simon Charette
1db5fce1ee
Oracle also treats NULLs as largests values when ordering.
2013-08-21 22:32:03 +01:00
Anssi Kääriäinen
f5552571dc
Fixed #20820 -- Model inheritance + m2m fixture loading regression
...
Tests by Tim Graham, report from jeroen.pulles@redslider.net .
2013-08-21 22:31:50 +01:00
Anssi Kääriäinen
ced3e6b17d
Fixed test failure caused by different NULL ordering between backends
2013-08-21 22:31:50 +01:00
Anssi Kääriäinen
cea7204504
Fixed #14056 -- Made sure LEFT JOIN aren't trimmed in ORDER BY
...
If LEFT JOINs are required for correct results, then trimming the join
can lead to incorrect results. Consider case:
TBL A: ID | TBL B: ID A_ID
1 1 1
2
Now A.order_by('b__a') did use a join to B, and B's a_id column. This
was seen to contain the same value as A's id, and so the join was
trimmed. But this wasn't correct as the join is LEFT JOIN, and for row
A.id = 2 the B.a_id column is NULL.
2013-08-21 22:30:46 +01:00
Simon Charette
63378163f9
Fixed #20943 -- Weakly reference senders when caching their associated receivers
2013-08-21 22:30:45 +01:00
Andrew Godwin
2e7f45a372
Change autodetector changes API to be just one method
2013-08-21 22:25:15 +01:00
Tim Graham
f7290581fe
Fixed a regression with get_or_create and virtual fields.
...
refs #20429
Thanks Simon Charette for the report and review.
2013-08-21 08:30:21 -04:00
Anssi Kääriäinen
b065aeb17f
Fixed #20946 -- model inheritance + m2m failure
...
Cleaned up the internal implementation of m2m fields by removing
related.py _get_fk_val(). The _get_fk_val() was doing the wrong thing
if asked for the foreign key value on foreign key to parent model's
primary key when child model had different primary key field.
2013-08-21 08:32:19 +03:00
Simon Charette
859e678b3d
Oracle also treats NULLs as largests values when ordering.
2013-08-20 12:28:59 -04:00
Anssi Kääriäinen
1ed77e7782
Fixed #20820 -- Model inheritance + m2m fixture loading regression
...
Tests by Tim Graham, report from jeroen.pulles@redslider.net .
2013-08-20 16:54:05 +03:00
Anssi Kääriäinen
8dc76c4b91
Fixed test failure caused by different NULL ordering between backends
2013-08-20 11:33:44 +03:00
Anssi Kääriäinen
905409855c
Fixed #14056 -- Made sure LEFT JOIN aren't trimmed in ORDER BY
...
If LEFT JOINs are required for correct results, then trimming the join
can lead to incorrect results. Consider case:
TBL A: ID | TBL B: ID A_ID
1 1 1
2
Now A.order_by('b__a') did use a join to B, and B's a_id column. This
was seen to contain the same value as A's id, and so the join was
trimmed. But this wasn't correct as the join is LEFT JOIN, and for row
A.id = 2 the B.a_id column is NULL.
2013-08-20 10:55:00 +03:00
Simon Charette
e55ca60903
Fixed #20943 -- Weakly reference senders when caching their associated receivers
2013-08-20 01:53:58 -04:00
Andrew Godwin
b6a957f0ba
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
docs/ref/django-admin.txt
2013-08-19 18:30:48 +01:00
Anssi Kääriäinen
7bc57a6d71
Fixed #11881 -- removed junk from aggregation subqueries
...
There were clauses that weren't needed in the subqueries. These were
ORDER BY, SELECT FOR UPDATE and related selections.
2013-08-19 16:15:09 +03:00
Anssi Kääriäinen
7737305a4f
Fixed #12886 -- aggregation over sliced queryset
2013-08-19 16:00:17 +03:00
Andrew Godwin
52edc16086
Add more stringent M2M tests and fix the bug they exposed
2013-08-19 13:50:26 +01:00
Andrew Godwin
5b522cd85a
Minor oracle fixes
2013-08-19 13:12:48 +01:00
Anssi Kääriäinen
4668c142dc
Made Model.__eq__ consider proxy models equivalent
...
Fixed #11892 , fixed #16458 , fixed #14492 .
2013-08-19 09:51:28 +03:00
Harm Geerts
240886183b
Fixed #20829 -- Skip postgis metadata tables with introspection
2013-08-16 21:14:29 +02:00
Andrew Godwin
157604a87f
Oracle schema backend, passes most tests and is pretty complete.
2013-08-13 20:54:57 +01:00
Loic Bistuer
163a34ce4b
Fixed #20883 -- Made model inheritance find parent links in abstract parents
2013-08-13 15:14:11 +03:00
Anssi Kääriäinen
dcdc579d16
Fixed #20874 -- bump_prefix() in nested subqueries
...
Also made some cleanup to build_filter() code by introducing submethods
solve_lookup_type() and prepare_lookup_value().
2013-08-13 14:11:52 +03:00
Andrew Godwin
44f907dd98
Start of getting Oracle to do schema stuff
2013-08-12 20:05:20 +01:00
Andrew Godwin
b61b634628
Fix weird planning issues when already fully migrated.
2013-08-11 15:28:51 +01:00