Ville Skyttä
575a9a791e
Normalized "an SQL" spelling.
2016-05-03 19:30:48 -04:00
Simon Charette
7ec330eeb9
Refs #26565 -- Errored nicely when using Prefetch with a values() queryset.
...
Thanks Maxime Lorant for the report and Anssi for the suggestion.
2016-05-03 09:28:31 -04:00
Michal Petrucha
8a47ba679d
Refs #16508 -- Made Model.__init__() aware of virtual fields.
...
It's no longer necessary for GenericForeignKey (and any other virtual fields)
to intercept the field's values using the pre_init signal.
2016-05-03 09:06:26 -04:00
Tim Graham
eab5df12b6
Refs #22936 -- Moved more of Field.get_db_prep_lookup() to lookups.
2016-05-02 07:58:24 -04:00
Cristiano
914c72be2a
Fixed #26058 -- Delegated os.path bits of FileField's filename generation to the Storage.
2016-04-30 17:22:40 -04:00
Anssi Kääriäinen
7f51876f99
Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading.
2016-04-29 13:06:32 -04:00
Joshua Phillips
4681d65048
Fixed #26557 -- Converted empty strings to None when saving GenericIPAddressField.
2016-04-29 10:11:49 -04:00
Simon Charette
f951bb78cb
Refs #26521 -- Adjusted CreateModel bases validation to account for mixins.
...
Thanks Collin for the report.
2016-04-28 18:20:48 -04:00
Simon Charette
a877a2f83d
Refs #26521 -- Added the duplicated value to CreateModel validation messages.
...
Thanks Tim for the suggestion.
2016-04-27 16:17:22 -04:00
James Robert
417e083e55
Fixed #26521 -- Validated CreateModel bases, fields and managers for duplicates.
2016-04-27 12:43:56 -04:00
Tim Graham
1ba0b22a7a
Refs #22936 -- Removed unused code in Field.get_db_prep_lookup().
2016-04-25 08:31:32 -04:00
Tim Graham
b454e2cbc9
Removed unused Q.clone().
...
Unused since afe0bb7b13
.
2016-04-25 08:31:32 -04:00
Tim Graham
901dc90db0
Removed unused/untested Field.get_choices_default()/value_to_string() methods.
2016-04-25 08:05:27 -04:00
Tim Graham
a755e0657e
Removed unused BaseExpression.refs_aggregate().
...
Unused since afe0bb7b13
.
2016-04-22 13:04:13 -04:00
Tim Graham
87338198e9
Fixed #26320 -- Deprecated implicit OneToOnField parent_link.
2016-04-22 12:59:41 -04:00
Tim Graham
6b0a25d9e2
Removed unused ForeignObject.attnames/get_defaults().
2016-04-22 10:00:50 -04:00
Tim Graham
2da7f5afcf
Removed unused ForeignObjectRel.get_choices() limit_to_currently_related argument.
...
Unused since its introduction in dc334a2ba8
.
2016-04-22 08:45:41 -04:00
Marc Tamlyn
2d877da855
Refs #3254 -- Added full text search to contrib.postgres.
...
Adds a reasonably feature complete implementation of full text search
using the built in PostgreSQL engine. It uses public APIs from
Expression and Lookup.
With thanks to Tim Graham, Simon Charettes, Josh Smeaton, Mikey Ariel
and many others for their advice and review. Particular thanks also go
to the supporters of the contrib.postgres kickstarter.
2016-04-22 10:44:37 +01:00
Loïc Bistuer
a885bca1df
Fixed #26528 -- Allowed any iterable (e.g. tuple) as validators kwarg for form/model fields.
2016-04-22 09:38:47 +07:00
Matthew Schinckel
5402f3ab09
Fixed #26475 -- Added functools.partial() support to migrations autodetector.
2016-04-19 10:17:11 -04:00
Lukasz Wiecek
d3c87a2425
Fixed #26498 -- Fixed TimeField microseconds round-tripping on MySQL and SQLite.
...
Thanks adamchainz for the report and review.
2016-04-18 09:39:46 -04:00
Tim Graham
0456a8b9e6
Fixed #26486 -- Fixed a select_related() + defer() MTI edge case.
2016-04-13 10:32:17 -04:00
Michal Petrucha
c339a5a6f7
Refs #16508 -- Renamed the current "virtual" fields to "private".
...
The only reason why GenericForeignKey and GenericRelation are stored
separately inside _meta is that they need to be cloned for every model
subclass, but that's not true for any other virtual field. Actually,
it's only true for GenericRelation.
2016-04-13 10:10:53 -04:00
Tim Graham
1c30a6473d
Refs #22936 -- Moved IntegerField.get_prep_lookup() logic to lookups.
2016-04-12 10:14:41 -04:00
Claude Paroz
f9a2a7db17
Fixed #26351 -- Added MySQL check to warn about strict mode option
...
Thanks Adam Chainz for the initial implementation in django-mysql.
Thanks Adam Chainz, Tim Graham, and Shai Berger for the reviews.
2016-04-08 20:34:16 +02:00
Claude Paroz
0d3c616fbb
Refs #26351 -- Added check hook to support database-related checks
...
Thanks Tim Graham and Shai Berger for the reviews.
2016-04-08 20:28:00 +02:00
Tim Graham
df8d8d4292
Fixed E128 flake8 warnings in django/.
2016-04-08 09:51:06 -04:00
Simon Charette
a6074e8908
Fixed #26458 -- Based Avg's default output_field resolution on its source field type.
...
Thanks Tim for the review and Josh for the input.
2016-04-05 23:48:08 -04:00
Attila Tovt
02ae5fd31a
Fixed #25850 -- Made migrate/makemigrations error on inconsistent history.
2016-04-05 08:52:08 -04:00
Tim Graham
6448873197
Fixed E402 flake8 warnings.
2016-04-04 17:14:27 -04:00
Tim Graham
2cd2d18851
Fixed W503 flake8 warnings.
2016-04-04 17:14:26 -04:00
Susan Tan
b0803d64c4
Fixed #26075 -- Added clearer wording for one-off values in makemigrations
2016-04-03 17:12:55 +02:00
Markus Holtermann
103d4e1d65
Fixed #26441 -- Added model Field.db_check() method
...
Thanks Common Code for financing the work on this commit.
2016-04-03 09:56:59 +02:00
Iacopo Spalletti
394755b8d9
Fixed #26443 -- Corrected timezone.now in MigrationQuestioner prompt
2016-04-03 01:33:06 +02:00
Akshesh
49f95cc0a0
Fixed #11560 -- Allowed proxy model multiple-inheritance from the same concrete base model.
2016-03-30 13:06:27 -04:00
Alex Hill
4b2cf1cd27
Fixed #26384 -- Fixed renaming the PK on a model with a self-referential FK on SQLite.
2016-03-29 13:25:09 -04:00
Claude Paroz
03b6947728
Fixed #24932 -- Added Cast database function.
...
Thanks Ian Foote for the initial patch.
2016-03-29 08:14:33 -04:00
Kai Feldhoff
5336158990
Fixed #25759 -- Added keyword arguments to customize Expressions' as_sql().
2016-03-29 08:09:58 -04:00
Simon Charette
67cf5efa31
Fixed #26413 -- Fixed a regression with abstract model inheritance and explicit parent links.
...
Thanks Trac alias trkjgrdg for the report and Tim for investigation and review.
2016-03-28 21:11:37 -04:00
Tim Graham
1c8c0837c6
Sorted single letter imports per the latest version of isort.
2016-03-28 11:45:31 -04:00
Claude Paroz
fc01c84bad
Avoided need to import model fields in models/functions.py.
2016-03-28 10:59:30 -04:00
Tim Graham
fb84e877ce
Normalized Func.as_sqlite() signature.
2016-03-28 10:59:12 -04:00
Alexey Kotlyarov
a52a531a8b
Fixed #26398 -- Made FieldFile.open() respect its mode argument.
2016-03-23 10:05:26 -04:00
Berker Peksag
157d7f1f1d
Fixed #25388 -- Added an option to allow disabling of migrations during test database creation
2016-03-23 08:21:30 +08:00
Kai Feldhoff
baa8b0ec39
Refs #25759 -- Fixed some Funcs to work if different database backends are used.
2016-03-21 20:20:29 -04:00
Jason Parrott
4c1c93032f
Fixed #26373 -- Fixed reverse lookup crash with a ForeignKey to_field in a subquery.
2016-03-19 17:54:29 -04:00
Claude Paroz
983c158da7
Refs #24227 -- Replaced M2M isinstance checks by field.many_to_many
...
Thanks Markus Holtermann, Collin Anderson and Tim Graham for the reviews.
2016-03-19 09:24:27 +01:00
Andrew Godwin
2b3a941457
Merge pull request #6310 from apollo13/informix
...
Pass type to sql_alter_column*.
2016-03-18 19:47:15 -03:00
Florian Apolloner
37cde8667e
Pass type to sql_alter_column*.
...
This helps databases which need the database type when changing the default
(Just like MySQL needs it for changing null…)
2016-03-18 23:11:02 +01:00
Tim Graham
f15f4b8bb6
Refs #26367 -- Removed obsolete _size cache on FieldField.
...
The _size attribute is used in File.size but FieldFile overrides it.
2016-03-17 10:25:17 -04:00
Markus Holtermann
1cb65b8a77
Fixed #26157 #25321 -- Added sql/params to extra context of schema logger
...
Thanks Akshesh Doshi for the initial patch and Tim Graham for the review
2016-03-15 17:45:58 +11:00
Claude Paroz
204e00c0c5
Fixed #26140 -- Suppressed MySQL warning when inserting binary content
...
Thanks Tim Graham for the review.
2016-03-14 18:08:13 +01:00
Noenglish Professorbut
f8d20da047
Fixed a few docstring typos.
2016-03-12 08:45:06 -05:00
Tim Graham
4f0cd0fd16
Fixed #26324 -- Fixed DurationField with fractional seconds on SQLite.
2016-03-10 12:18:29 -05:00
Jarek Glowacki
34c56687ae
Fixed #26342 -- Prevented unpacking when repr a NodeNotFoundError
2016-03-10 17:27:35 +11:00
Tim Graham
359be4460e
Refs #19527 -- Fixed SQL compiler regression causing Oracle failure.
2016-03-05 14:02:35 -05:00
Akshesh
b886f166b3
Fixed #26316 -- Factored duplicated code in model/field migration operations.
2016-03-03 18:24:36 -05:00
Simon Charette
c92123cc1d
Fixed #26226 -- Made related managers honor the queryset used for prefetching their results.
...
Thanks Loïc for the suggested improvements and Tim for the review.
2016-03-02 16:10:18 -05:00
Marc Tamlyn
8ddc79a799
Fixed #26285 -- Deprecated the MySQL-specific __search lookup.
2016-03-02 14:41:56 -05:00
acrefoot
04240b2365
Refs #19527 -- Allowed QuerySet.bulk_create() to set the primary key of its objects.
...
PostgreSQL support only.
Thanks Vladislav Manchev and alesasnouski for working on the patch.
2016-03-02 14:29:09 -05:00
Matthew Schinckel
60633ef3de
Fixed #26304 -- Ignored unmanaged through model in table introspection.
2016-03-02 13:54:27 -05:00
Simon Charette
0223e213dd
Fixed #26186 -- Documented how app relative relationships of abstract models behave.
...
This partially reverts commit bc7d201bdb
.
Thanks Tim for the review.
Refs #25858 .
2016-02-29 22:07:05 -05:00
Adam Chainz
6a383f773a
Removed unused 'Between' lookup.
...
It was added in 20bab2cf9d
and stopped being
used for `Range` in 00aa562884
when
`bilateral` was added to `Transform`.
2016-02-29 08:00:04 -05:00
chenesan
b84f5ab4ec
Fixed #26230 -- Made default_related_name affect related_query_name.
2016-02-27 08:48:32 -05:00
Attila Tovt
5e2c4d7afb
Fixed #26264 -- Fixed prefetch_related() crashes with values_list(flat=True)
2016-02-26 19:26:15 -05:00
Adam Chainz
ef33bc2d4d
Fixed #25279 -- Made prefetch_related_objects() public.
2016-02-26 14:55:01 -05:00
Simon Charette
766afc22a1
Fixed #24793 -- Unified temporal difference support.
2016-02-26 12:25:12 -05:00
zshimanchik
65aa94200b
Fixed #24653 -- Fixed MySQL database introspection when using read_default_file.
2016-02-26 12:02:13 -05:00
Edwar Baron
eb44172760
Fixed #25811 -- Added a helpful error when making _in queries across different databases.
2016-02-26 07:31:56 -05:00
Yoong Kang Lim
4b1529e2cb
Fixed #26151 -- Refactored MigrationWriter.serialize()
...
Thanks Markus Holtermann for review.
2016-02-25 14:01:06 -05:00
Scott Sexton
fc584f0685
Fixed #26117 -- Consulted database routers in initial migration detection.
...
Thanks Simon Charette for help.
2016-02-25 09:56:00 -05:00
Tim Graham
70d3f81ca4
Fixed #26233 -- Fixed invalid reSt in models.Q docstring.
2016-02-18 08:45:55 -05:00
Akshesh
fdccc02576
Fixed #26219 -- Fixed crash when filtering by Decimal in RawQuery.
2016-02-17 13:56:42 -05:00
Tim Graham
004ba0f99e
Removed unneeded hint=None/obj=None in system check messages.
2016-02-12 13:01:25 -05:00
Markus Holtermann
18afd50a2b
Updated allow_migrate() signature in check framework tests
2016-02-12 14:31:27 +11:00
Anssi Kääriäinen
46ecfb9b3a
Fixed #26196 -- Made sure __in lookups use to_field as default.
...
Thanks Simon Charette for the test.
2016-02-11 11:09:08 -05:00
ZachLiuGIS
04e13c8913
Fixed #26179 -- Removed null assignment check for non-nullable foreign key fields.
2016-02-11 10:07:39 -05:00
Anssi Kääriäinen
353aecbf8c
Fixed #26153 -- Reallowed Q-objects in ForeignObject.get_extra_descriptor_filter().
2016-02-11 08:59:43 -05:00
Brobin
dca8b916ff
Fixed #26154 -- Deprecated CommaSeparatedIntegerField
2016-02-10 17:57:43 -05:00
Simon Charette
a325fb1f9b
Fixed #26162 -- Checked query name clashes of hidden relationships.
...
Although reverse accessor clashes should be skipped query name can't be hidden.
Thanks to Ian Foote and Tim Graham for the review.
2016-02-08 09:59:27 -05:00
Tim Graham
10a162809f
Refs #24007 -- Removed an apps.populate() call in model unpickling that can cause deadlocks.
2016-02-08 08:28:48 -05:00
Tim Graham
db9f21f0ad
Fixed typo in django/db/migrations/state.py.
2016-02-08 07:41:25 -05:00
Tim Graham
97eb3356b2
Fixed #26177 -- Fixed a PostgreSQL crash with TIME_ZONE=None and USE_TZ=False.
2016-02-08 07:21:54 -05:00
Pankrat
f91a04621e
Fixed #25833 -- Added support for non-atomic migrations.
...
Added the Migration.atomic attribute which can be set to False
for non-atomic migrations.
2016-02-05 09:09:05 -05:00
James Pulec
f05722a08a
Fixed #25354 -- Added class/app_label interpolation for related_query_name.
2016-01-28 11:10:47 -05:00
François Freitag
bdbe50a491
Fixed #25546 -- Prevented duplicate queries with nested prefetch_related().
2016-01-26 07:20:13 -05:00
Simon Charette
4dcaa5871b
Fixed #26135 -- Adjusted the migration questioner's handling of disabled apps.
...
This was causing an issue when calling the `migrate` command in a test case with
the `available_apps` attribute pointing to an application with migrations
disabled using the `MIGRATION_MODULES` setting.
Thanks to Tim Graham for the review.
Refs #24919
2016-01-25 21:38:36 -05:00
userimack
60586dd737
Fixed #26125 -- Fixed E731 flake warnings.
2016-01-25 14:23:43 -05:00
Simon Charette
729e0b086d
Fixed #24109 -- Allowed RunSQL and RunPython operations to be elided.
...
Thanks to Markus Holtermann and Tim Graham for their review.
2016-01-23 14:19:03 -05:00
Simon Charette
49f4c9f4c6
Fixed #26064 -- Moved operation reduction logic to their own class.
...
Thanks to Markus Holtermann and Tim Graham for their review.
2016-01-23 14:19:02 -05:00
seungkwon
5925e20c37
Fixed typo in django/db/backends/sqlite3/operations.py.
2016-01-23 07:05:47 -05:00
Joshua Phillips
16baec5c8a
Fixed #25910 -- Rejected read-only property names in model constructors.
2016-01-22 13:27:11 -05:00
Tim Graham
4dc74371e3
Removed unused attributes of MySQL SchemaEditor.
2016-01-22 12:46:27 -05:00
Aymeric Augustin
f91b5a7e4b
Fixed #26063 -- Crash when passing > 2000 params.
...
If SQLITE_MAX_VARIABLE_NUMBER (default = 999) is changed at compile time
to be greater than SQLITE_MAX_COLUMN (default = 2000), which Debian does
by setting the former to 250000, Django raised an exception on queries
containing more than 2000 parameters when DEBUG = True.
2016-01-21 10:47:15 +01:00
Anssi Kääriäinen
ee596888e1
Fixed #26092 -- Fixed QuerySet.order_by() regression with an M2M through model.
2016-01-20 19:13:05 -05:00
pp
b34ff66e5b
Added missing period to "etc.".
2016-01-11 18:05:15 -05:00
Simon Charette
bc7d201bdb
Fixed #25858 -- Bound abstract model application relative relationships.
...
Thanks to Karl Hobley for the report and Markus, Shai, Aymeric for their input
and Tim for the review.
2016-01-11 12:23:23 -05:00
Curtis Maloney
3792e291e6
Removed use of locals for print formatting in Oracle backend.
2016-01-11 07:13:24 -05:00
Tim Graham
56aaae58a7
Fixed #26034 -- Fixed incorrect index handling on PostgreSQL on Char/TextField with unique=True and db_index=True.
...
Thanks Simon Charette for review.
2016-01-08 12:47:05 -05:00
Anderson Resende
b5f8c81ce1
Fixed #26026 -- Fixed isinstance crash comparing EmptyQuerySet to non-QuerySet.
2016-01-07 10:57:05 -05:00