Adam Chainz
9d4246419c
Refs #26207 -- Removed obsolete comments about deferred model classes.
2016-11-20 18:22:13 -05:00
Adam Chainz
cc1f6f26b6
Fixed #27514 -- Tested Model.__init__ excessive number of fields.
2016-11-20 13:21:59 -05:00
Simon Charette
31a56e30cf
Fixed #27407 -- Made Model.delete(keep_parents=True) preserve parent reverse relationships.
...
Thanks Tim for the review.
2016-11-15 20:16:06 -05:00
Ramin Farajpour Cami
0a63ef3f61
Fixed #27463 -- Fixed E741 flake8 warnings.
2016-11-14 17:40:28 -05:00
Sergey Fedoseev
c7bfcd2f37
Fixed #27481 -- Made SQLite return annotated boolean values as boolean, not integer.
...
Thanks Simon Charette for review.
2016-11-14 14:47:20 -05:00
Ramin Farajpour Cami
967be82443
Fixed E305 flake8 warnings.
2016-11-14 12:30:46 -05:00
Mads Jensen
1446902be4
Fixed #25240 -- Added ExtractWeek and exposed it through the __week lookup.
...
Thanks to Mariusz Felisiak and Tim Graham for review.
2016-11-11 08:01:40 -05:00
Tim Graham
ac0cf97cb4
Removed redundant DateTimeField.register_lookup()s.
...
DateTimeField inherits these lookups from DateField.
2016-11-10 10:15:56 -05:00
Mariusz Felisiak
dacef9137f
Refs #27420 -- Removed exception hiding in Oracle test user creation during --keepdb.
...
If the test user creation fails here, _create_test_db() would return without
switching to the test user which caused the tests to run using the main
connection instead of the test user.
2016-11-08 16:53:52 -05:00
Mariusz Felisiak
c4b04e1598
Fixed #27420 -- Quoted the Oracle test user password in queries.
2016-11-08 16:30:22 -05:00
Maxime Lorant
cb3fb34b86
Fixed #27378 -- Added support for serialization of uuid.UUID in migrations.
...
Thanks Yuriy Korobko for the initial patch and Tobias McNulty for review.
2016-11-06 13:53:00 +01:00
Saulius Žemaitaitis
f28d29e8b7
Fixed #27372 -- Fixed introspection of SQLite foreign keys with spaces in DDL.
...
Thanks samuller for the report and initial patch.
2016-11-06 10:13:32 +01:00
Adam Chainz
c7dddc01d6
Fixed #27441 -- Improved SQL for 'DROP COLUMN' on MySQL
...
'CASCADE' is an undocumented no-op in MySQL, so to avoid confusion Django no longer outputs it.
2016-11-05 22:23:57 +01:00
Marti Raudsepp
da7910d483
Fixed CVE-2016-9013 -- Generated a random database user password when running tests on Oracle.
...
This is a security fix.
2016-11-01 09:30:57 -04:00
Tim Graham
2f9861d823
Fixed #27148 -- Fixed ModelMultipleChoiceField crash with invalid UUID.
2016-10-31 15:21:05 -04:00
Michael Scott
ec9ed07488
Fixed #27188 -- Allowed using unique=True with FileField.
...
Thanks Tim Graham for the initial patch.
2016-10-28 20:11:03 -04:00
Aymeric Augustin
fd748c42a9
Simplified AppConfig.import_models().
...
Since AppConfig now has a reference to its parent Apps registry,
it can look up the models there instead of receiving them in argument.
2016-10-28 18:43:45 -04:00
Aymeric Augustin
efcb7e1ebf
Modified readiness check in AppConfig.get_model(s).
...
It was inconsistent with the equivalent check in Apps.get_model(s)
because I made incorrect assumptions when I wrote that code and
needlessly complicated readiness checks.
This is a backwards-incompatible change.
2016-10-28 18:42:29 -04:00
Tim Graham
1bc249c2a6
Fixed #20939 -- Simplified query generation by converting QuerySet to Query.
...
Thanks Anssi Kääriäinen for the initial patch and Anssi, Simon Charette,
and Josh Smeaton for review.
2016-10-28 11:20:23 -04:00
Tim Graham
414ad25b09
Fixed #27327 -- Simplified time zone handling by requiring pytz.
2016-10-27 08:53:20 -04:00
Adam Chidlow
f734e2d4b2
Fixed #27334 -- Allowed FileField to move rather than copy a file.
...
When a FileField is set to an instance of File that is not also an
instance of FieldFile, pre_save() passes that object as the contents to
Storage.save(). This allows the file to be moved rather than copied
to the upload destination.
2016-10-26 12:25:30 -04:00
David Barragán Merino
b3bd3aa07c
Fixed #27385 -- Fixed QuerySet.bulk_create() on PostgreSQL when the number of objects is a multiple plus one of batch_size.
2016-10-25 19:21:08 -04:00
Marti Raudsepp
51fbe2a60d
Updated postgresql.org links to https and made them canonical.
2016-10-25 11:43:32 -04:00
Tim Graham
19f1321fa4
Removed unused loop in Query.change_aliases().
...
Unknown if it was ever used.
2016-10-24 11:27:41 -04:00
François Freitag
86bb9a0502
Refs #20888 -- Fixed index ordering introspection on PostgreSQL 9.6.
2016-10-17 07:16:13 -04:00
Tim Graham
50864b402b
Removed unused branch in ModelIterable.__iter__().
...
Unknown if it was ever used.
2016-10-15 10:19:47 -04:00
Tim Graham
5d1941adcf
Removed unused 'field' argument to DeleteQuery.delete_batch().
...
Unused since a170c3f755
.
2016-10-15 10:19:02 -04:00
Tim Graham
274b227796
Removed DatabaseFeatures.can_combine_inserts_with_and_without_auto_increment_pk.
...
Unused (always False) after 29132ebdef
.
2016-10-14 17:18:28 -04:00
Tim Graham
8997750c43
Removed unused QuerySet.value_annotation attribute.
...
Unused since 5008a4db44
.
2016-10-14 16:46:37 -04:00
Mariusz Felisiak
5a772a0b7b
Fixed #27324 -- Simplified DatabaseIntrospection.get_constraints() on Oracle.
2016-10-14 13:59:13 -04:00
Tim Graham
b679a3cdb1
Tested QuerySet compatibility check.
...
cdfdcf4b70
missed this test.
2016-10-14 08:51:04 -04:00
Tim Graham
f2dc6b3a99
Removed unused InsertQuery.clone().
...
Unknown if it was ever needed.
2016-10-13 16:58:43 -04:00
Tim Graham
3b2db6ec12
Removed unneeded try/except in Query.names_to_path().
2016-10-13 16:56:54 -04:00
Tim Graham
df1796b13f
Removed unused branch in SQLUpdateCompiler.as_sql().
...
Unknown if it was ever needed.
2016-10-13 16:56:26 -04:00
Tim Graham
419de7b00d
Removed unused branch in Query.change_aliases().
...
Unused since 0c7633178f
.
2016-10-13 14:35:10 -04:00
Tim Graham
816eae3508
Removed unused EmptyResultSets in SQLCompilers.
...
Unused since ed1bcf0515
.
2016-10-13 12:12:58 -04:00
João Sampaio
74a575eb72
Fixed #24607 -- Serialized natural keys in multi-table inheritance models.
2016-10-12 20:04:57 -04:00
Mariusz Felisiak
794f866cec
Fixed #27323 -- Optimized Oracle introspection by using USER_SEQUENCES instead of USER_CATALOG.
2016-10-12 18:58:33 -04:00
Tim Graham
a3a10f8abe
Removed unused SubqueryConstraint.relabel_aliases() and clone() methods.
...
Unused since b68212f539
.
2016-10-12 08:18:56 -04:00
Nick Pope
f1664a2734
Replaced '__' with LOOKUP_SEP constant.
2016-10-11 11:14:06 -04:00
Tim Graham
46a3d7604e
Fixed gis_tests.geoapp when run in isolation.
...
"from django.db.models import *" in contrib/gis/db/models/__init__.py could
obscure gis's functions.py resulting in exceptions like:
"module 'django.db.models.functions' has no attribute 'Union'".
2016-10-10 10:13:01 -04:00
Claude Paroz
979ea95608
Fixed #27300 -- Made makemigrations --dry-run output a string (no bytes)
...
Thanks Markus Holtermann for the report and the review.
2016-10-06 11:41:35 +02:00
Tim Graham
0083a4c8e9
Refs #18974 -- Deprecated @models.permalink() decorator.
2016-10-04 14:39:49 -04:00
François Freitag
8ac115c730
Fixed #27193 -- Preserved ordering in select_for_update subqueries.
2016-10-04 10:46:29 -04:00
François Freitag
1db1f74617
Refs #27118 -- Reallowed using pk in QuerySet.get/update_or_create().
2016-10-04 10:10:39 -04:00
Simon Charette
040bd7c938
Fixed #27279 -- Fixed a migration performance regression related to RenameModel operations.
...
Thanks Trac alias mtomiyoshi for the report, Marten Kenbeek for the initial
patch and Tim for the review.
2016-10-04 08:35:15 -04:00
Mariusz Felisiak
6e4e0f4ce4
Fixed #26541 -- Allowed MySQL transaction detection to work without table creation.
2016-10-01 10:01:44 -04:00
Tim Graham
9819676676
Updated links to the current version of MySQL docs.
2016-09-30 09:14:17 -04:00
Tim Graham
a44fc008c4
Fixed #27217 -- Fixed crash in CreateModel optimization with models that use mixins.
...
Thanks Simon Charette for review.
2016-09-28 10:04:52 -04:00
Zapelini
62543260dd
Fixed #27282 -- Allowed using an integer DATABASES['PORT'] for Oracle.
2016-09-27 15:01:30 -04:00