Commit Graph

3305 Commits

Author SHA1 Message Date
Claude Paroz 388bb5bd9a Fixed #22936 -- Obsoleted Field.get_prep_lookup()/get_db_prep_lookup()
Thanks Tim Graham for completing the initial patch.
2016-05-04 20:02:01 +02:00
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
Amos Onn bd3c2900fc Fixed #25892 -- Optimized SeparateDatabaseAndState.database_backwards().
Now intermediate states in the database_backwards are cached, similar to
the executor's migrate() (or _migrate_all_backwards()). This makes the
migration run much faster (O(n) instead of O(n^2) over number of
database_operations).
2016-01-07 08:13:56 -05:00
Simon Charette 7bb373e309 Refs #25746 -- Added a test utility to isolate inlined model registration.
Thanks to Tim for the review.
2016-01-06 20:00:07 -05:00
varunnaganathan 3eba9638ee Fixed #25316 -- Fixed a crash with order_by() and values() after annotate(). 2016-01-02 07:06:54 -05:00
Marten Kenbeek 16411b8400 Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
Thanks to Tim Graham for the review.
2015-12-31 14:21:29 -05:00
Ville Skyttä e6ca15c13f Passed logging message parameters as arguments instead of interpolating them. 2015-12-26 18:35:42 -05:00
Bryan Marty 62ca2dea04 Fixed #8065 -- Made id_list an optional argument for QuerySet.in_bulk(). 2015-12-26 17:57:19 -05:00
Alexander Sosnovskiy 2a7ce34600 Fixed #14286 -- Added models.BigAutoField. 2015-12-25 20:01:31 -05:00
Varun Sharma 692d055890 Fixed #25984 -- Corrected RuntimeError message in ModelBase.__new__(). 2015-12-24 16:44:58 -05:00
Chris Lamb 77b8d8cb6d Discouraged use of /tmp with predictable names.
The use of predictable filenames in /tmp often leads to symlink attacks
so remove the most obvious use of them in the docs.
2015-12-24 09:54:33 -05:00
Luis San Pablo a856555df2 Fixed #25981 -- Added need to update migrations to on_delete deprecation warning. 2015-12-24 08:08:22 -05:00
Tomo Otsuka 8b6974a685 Fixed #25972 -- Restored support for the isnull lookup with ForeignObject. 2015-12-24 07:33:55 -05:00
Tim Graham fa9ce4e9a6 Fixed #25922 -- Fixed migrate --fake-initial detection of many-to-many tables. 2015-12-19 13:37:24 -05:00
Ian Foote 86eccdc8b6 Fixed #25544 -- Removed duplicate ids in prefetch_related() queries. 2015-12-17 19:08:30 -05:00
Sergey Fedoseev ed1bcf0515 Refs #25894 -- Fixed evaluation of zero-length slices of QuerySet.values() on Oracle. 2015-12-17 17:07:10 -05:00
Simon Charette c4e372aaf4 Fixed #25852 -- Made sure AlterModelManager forces a reload of its model state.
Thanks to Geoffrey Sechter and the Django NYC group for the report and Markus
for the review.
2015-12-15 12:22:59 -05:00
Stewart Park b7fdd60d85 Fixed #24675 -- Skipped SQL_AUTO_IS_NULL query on MySQL if not needed. 2015-12-15 10:30:57 -05:00
Sergey Fedoseev 69b69f6d60 Fixed #25894 -- Fixed evaluation of zero-length slices of QuerySet.values(). 2015-12-15 07:29:35 -05:00
Ed Bartosh 423b3afce4 Fixed #25939 -- Removed redundant transaction in QuerySet.update_or_create().
There is no need to wrap the save() call in transaction.atomic() as
it's already done down the call stack in Model.save_base().
2015-12-14 19:41:11 -05:00
Simon Charette 8035cee922 Fixed #25882 -- Prevented fast deletes matching no rows from crashing on MySQL.
Thanks to Trac aliases gerricom for the report, raphaelmerx for the
attempts to reproduce and Sergey Fedoseev and Tim for the review.

Refs #16891
2015-12-14 13:12:36 -05:00
Federico Frenguelli 3a36c80795 Fixed #25412 -- Fixed missing PostgreSQL index on Char/TextField when using AlterField.
Thanks to Emanuele Palazzetti for the help.
2015-12-10 16:12:51 -05:00
Amos Onn 542b7f6c50 Fixed #25896 -- Fixed state bug in SeparateDatabaseAndState.database_backwards(). 2015-12-09 11:06:57 -05:00
Attila Tovt 6f229048dd Fixed #25547 -- Made Model.refresh_from_db() update FileField's instance. 2015-12-05 17:23:13 -05:00
Alexander Sosnovskiy b61eab18f7 Fixed #13774 -- Added models.Field.rel_db_type(). 2015-12-04 07:55:41 -05:00
Raphaël Hertzog 9f4e031bd3 Fixed #25761 -- Added __cause__.__traceback__ to reraised exceptions.
When Django reraises an exception, it sets the __cause__ attribute even
in Python 2, mimicking Python's 3 behavior for "raise Foo from Bar".
However, Python 3 also ensures that all exceptions have a __traceback__
attribute and thus the "traceback2" Python 2 module (backport of Python
3's "traceback" module) relies on the fact that whenever you have a
__cause__ attribute, the recorded exception also has a __traceback__
attribute.

This is breaking testtools which is using traceback2 (see
https://github.com/testing-cabal/testtools/issues/162).

This commit fixes this inconsistency by ensuring that Django sets
the __traceback__ attribute on any exception stored in a __cause__
attribute of a reraised exception.
2015-12-03 16:31:50 -05:00
Josh Soref 93452a70e8 Fixed many spelling mistakes in code, comments, and docs. 2015-12-03 12:48:24 -05:00
Simon Charette cc2ca9c550 Fixed #25807 -- Instructed the migration writer about lazy objects.
Thanks to Trac alias mrgaolei for the report, Baptiste for the confirmation
and Tim for the review.
2015-11-26 11:14:47 -05:00
George Marshall 710e11d076 Fixed #25767 -- Fixed data truncation possibility with Positive(Small)IntegerField on MySQL. 2015-11-24 11:09:15 -05:00
Claude Paroz 68554d1676 Fixed #13427 -- Made auto-m2m verbose names translatable 2015-11-21 18:09:57 +01:00
Tim Graham 54e2e688e1 Fixed #25715 -- Fixed Model.refresh_from_db() with ForeignKey w/on_delete=SET_NULL. 2015-11-21 10:34:01 -05:00
Ana Vojnovic 73a6ab6382 Fixed #25551 -- Fixed migration operations ordering when adding fields and a unique_together constraint. 2015-11-20 12:20:41 -05:00
Andrei Fokau 998894e1b9 Fixed #25764 -- Added support for serialization of enum.Enum in migrations.
Thanks Tim Graham for the review.
2015-11-19 17:21:12 -05:00
Dmitry Dygalo 92eced62cd Simplified lists creation in three places. 2015-11-17 07:58:49 -05:00
Patryk Zawadzki 7628f87e2b Fixed #25750 -- Made Options._expire_cache() faster
Avoided unnecessary list operations and delattr() calls that result
in an exception being raised as it causes call frame reconstruction
which is very costly, especially so in a function that is called
millions of times.
2015-11-14 16:43:46 -05:00
Tim Graham abcdb237bb Refs #25196 -- Fixed incorrect argument order in test database creation. 2015-11-13 11:29:35 -05:00
Simon Charette c550beb0cc Fixed #25723 -- Made related field checks lookup against their local apps. 2015-11-11 19:33:54 -05:00
Razzi Abuissa c819780d3f Removed gendered pronoun in a code comment. 2015-11-11 17:07:13 -05:00
Simon Charette 4a9c32f5ee Refs #25693 -- Avoided redundant calls to get_fields() in `to_attr` validation. 2015-11-11 12:25:10 -05:00
Simon Charette 4cd5d846d4 Fixed #25730 -- Made Model.__str__() always return str instances.
Thanks to Kevin Turner for the report and Tim for the review.
2015-11-11 12:18:52 -05:00
Ian Foote 4608573788 Fixed #25693 -- Prevented data loss with Prefetch and ManyToManyField.
Thanks to Jamie Matthews for finding and explaining the bug.
2015-11-10 12:12:07 -05:00
Laura Feier 7862cbda86 Fixed #24576 -- Made deletion of related objects deterministic. 2015-11-09 15:04:48 -05:00
Dmitry Dygalo 917100eed7 Simplified dict initialization in two places. 2015-11-07 21:46:46 +01:00
Sergey Fedoseev 0a26121797 Refs #25629 -- Added `arity` class attribute to `Func` expressions 2015-11-02 20:09:21 +01:00
Tim Graham c4af8eb366 Refs #25618 -- Removed detection of south migrations in loader.
It doesn't seem relevant for anyone upgrading to Django 1.10
and beyond.
2015-10-28 09:16:22 -04:00
Ian Foote 32ef48aa56 Fixed #25609 -- Fixed regression in related field nested lookup error. 2015-10-27 13:49:00 -04:00
Simon Charette 976bd519a8 Revert "Fixed #25417 -- Added a field check for invalid default values."
This reverts commit 71ebcb85b9.
2015-10-27 11:02:35 -04:00
Tim Graham 9c5e272860 Fixed #25550 -- Deprecated direct assignment to the reverse side of a related set. 2015-10-27 07:57:15 -04:00
Tim Graham 0b5d32faca Fixed #25611 -- Standardized descriptor signatures. 2015-10-26 11:31:16 -04:00
Mariusz Felisiak 0f6d51e6a0 Fixed #25470 -- Avoided unnecessary, expensive DATETIME typecast on MySQL. 2015-10-21 19:24:19 -04:00
Simon Charette 2ee67f0373 Moved an inner function in db.migrations.state to avoid redefinition. 2015-10-19 20:15:13 -04:00