Commit Graph

28021 Commits

Author SHA1 Message Date
Sergey Fedoseev f2a725fba3 Fixed #30274 -- Prevented segmentation fault on LineString iteration.
This reverts commit 138a78ec8c and adds
a test for the regression.
2020-01-21 21:46:47 +01:00
Adam Johnson e4bc4f26b2 Made examples concrete in upgrade documentation. 2020-01-21 13:02:14 +01:00
Christopher G Johnson 33ec01caaf Refs #29095 -- Added test for using QuerySet.count() with window expressions ordered by related fields.
Fixed in 3f32154f40.
2020-01-21 10:43:21 +01:00
Tim Graham 227d0c7365 Fixed #31183 -- Added a feature flag for "<db> only supports UNBOUNDED together with PRECEDING and FOLLOWING". 2020-01-20 20:03:35 +01:00
Matthijs Kooijman 2a2ea4ee18 Refs #31117 -- Made various tests properly handle unexpected databases aliases.
- Used selected "databases" instead of django.db.connections.
- Made routers in tests.migrations skip migrations on unexpected
  databases.
- Added DiscoverRunnerGetDatabasesTests.assertSkippedDatabases() hook
  which properly asserts messages about skipped databases.
2020-01-20 14:39:02 +01:00
Jon Dufresne 26be703fe6 Changed re-raising an exception to use bare raise syntax where appropriate. 2020-01-20 11:44:28 +01:00
Matthijs Kooijman b64b1b2e1a Fixed #31117 -- Isolated backends.base.test_creation.TestDbCreationTests.
Previously, this test could modify global state by changing
connection.settings_dict. This dict is a reference to the same dict as
django.db.connections.databases['default'], which is thus also changed.
The cleanup of this test would replace connection.settings_dic` with a
saved copy, which would leave the dict itself modified.

Additionally, create_test_db() would also modify these same dicts, as
well as settings.databases['default']['NAME'] by adding a "test_"
prefix, which is what can cause problems later.

This patch:
 - makes a complete copy of the connection and work on that, to improve
   isolation.
 - calls destroy_test_db() to let that code clean up anything done by
   create_test_db().
2020-01-20 11:00:17 +01:00
Mariusz Felisiak f34be5294d Refs #31117 -- Moved get_connection_copy() test hook to a module level. 2020-01-20 11:00:05 +01:00
Sergey Fedoseev a920c0b852 Fixed #31142 -- Fixed MakeValid.output_field when geometry type is changed.
Regression in 2ef4b4795e.
2020-01-20 08:59:45 +01:00
Mariusz Felisiak 7d8df4ad03
Fixed field default in dates tests. 2020-01-18 20:07:25 +01:00
Claude Paroz c7b97ac3a7 Added missing backtick in instances docs. 2020-01-17 20:26:36 +01:00
Daniel Hahler 68e018010b Optimized ModelAdmin._changeform_view() by avoiding multiple get_fieldsets() calls.
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2020-01-17 16:00:04 +01:00
Adam Johnson 26be53dd89 Added note about incomplete HTML in tutorial 3. 2020-01-17 15:28:31 +01:00
Carlton Gibson 56071826bb Refs #30752 -- Doc'd error reporting related optional request attributes. 2020-01-17 15:11:43 +01:00
Ram Rachum bf3e8227a9 Fixed #31166 -- Used "raise from" when raising ImproperlyConfigured exceptions in django.urls.resolvers.
This change sets the __cause__ attribute to raised exceptions and makes
small cleanups in error messages.
2020-01-17 11:44:22 +01:00
Takayuki Hirayama 73563183c2 Fixed #31171 -- Fixed wording in auto-escaping section of custom template tags docs. 2020-01-17 09:20:44 +01:00
Pavel Lysak 13e4abf83e Fixed #30752 -- Allowed using ExceptionReporter subclasses in error reports. 2020-01-16 15:25:49 +01:00
Anael Mobilia a5a28de89d Added apps.py to project from tutorials in reusable apps docs. 2020-01-16 14:51:27 +01:00
Mariusz Felisiak 266c853e10
Fixed #31162 -- Prevented error logs when using WKT strings in lookups.
Thanks dbxnr for the initial patch.

Regression in 6f44f714c9.
2020-01-16 14:34:54 +01:00
Flavio Curella d08d4f464a Fixed #30765 -- Made cache_page decorator take precedence over max-age Cache-Control directive. 2020-01-16 13:39:16 +01:00
Adam Johnson 1e0dcd6c8b Used constant instead of hard-coded value for recursive relationship. 2020-01-16 08:34:58 +01:00
Mariusz Felisiak bf77669453
Fixed #29998 -- Allowed multiple OneToOneFields to the parent model.
We assumed that any OneToOneField's in a child model must be the
parent link and raised an error when parent_link=True was not
specified. This patch allows to specify multiple OneToOneField's to
the parent model.

OneToOneField's without a custom related_name will raise fields.E304
and fields.E305 so this should warn users when they try to override
the auto-created OneToOneField.
2020-01-16 08:06:16 +01:00
Carlton Gibson 7400da49a5 Clarified backport policy for regressions. 2020-01-15 15:52:03 +01:00
Carlton Gibson 29c126bb34 Fixed #31124 -- Fixed setting of get_FOO_display() when overriding inherited choices.
Regression in 2d38eb0ab9
2020-01-15 15:35:22 +01:00
Mariusz Felisiak d202846ced
Refs #29998 -- Corrected auto-created OneToOneField parent_link in MTI docs. 2020-01-15 15:07:07 +01:00
Mariusz Felisiak c5e373d48c Fixed obsolete comment in django.utils.crypto.salted_hmac().
Obsolete since 13864703bc.
2020-01-15 12:53:21 +01:00
Claude Paroz b5a62bd17d Refs #27468 -- Added explicit tests for django.utils.crypto.salted_hmac() 2020-01-15 12:53:21 +01:00
Mariusz Felisiak 59b4e99dd0
Refs #31136 -- Made QuerySet.values()/values_list() group only by selected annotation.
Regression in 0f843fdd5b.
2020-01-15 09:32:42 +01:00
chetan22 63e6ee1f99 Fixed #29871 -- Allowed setting pk=None on a child model to create a copy.
Thanks Simon Charette and Tim Graham for the initial patch.
2020-01-15 08:28:30 +01:00
Carlton Gibson 927c903f3c Refs #31097 -- Added release notes for 2f565f84ac.
.
2020-01-14 14:35:28 +01:00
Daniel Hahler 4fe486520f Fixed <span> nesting in technical 500 template. 2020-01-14 10:08:27 +01:00
Daniel Hahler 20debf01bd Fixed typo in docs/ref/django-admin.txt. 2020-01-13 12:39:14 +01:00
Owen T. Heisler 77d335e5ab Fixed #31160 -- Fixed admin CSS for ordered lists' descendants in unordered list. 2020-01-13 09:13:33 +01:00
Carlton Gibson 1f4b9f4f1f Removed unused ExceptionReporterFilter class.
Unused since 8f8c54f70b.
2020-01-11 20:18:38 +01:00
Mariusz Felisiak 6f7998adc7
Fixed #31155 -- Fixed a system check for the longest choice when a named group contains only non-string values.
Regression in b6251956b6.

Thanks Murat Guchetl for the report.
2020-01-11 19:47:36 +01:00
Adam Donaghy 8b3e714ecf Fixed #30980 -- Improved error message when checking uniqueness of admin actions' __name__.
Thanks Keshav Kumar for the initial patch.
2020-01-10 14:00:28 +01:00
Carlton Gibson e2d9d66a22 Fixed #23004 -- Added request.META filtering to SafeExceptionReporterFilter.
Co-authored-by: Ryan Castner <castner.rr@gmail.com>
2020-01-10 11:35:41 +01:00
Carlton Gibson 581ba5a948 Refs #23004 -- Allowed exception reporter filters to customize settings filtering.
Thanks to Tim Graham for the original implementation idea.

Co-authored-by: Daniel Maxson <dmaxson@ccpgames.com>
2020-01-10 11:21:23 +01:00
Adam Johnson 5166097d7c Fixed #31154 -- Added support for using enumeration types in templates.
Enumeration helpers are callables, so the template system tried to call
them with no arguments.

Thanks Rupert Baker for helping discover this.
2020-01-10 07:52:06 +01:00
Carlton Gibson 4c1b401e82 Added file cleanup in FileFieldTests.test_pickle(). 2020-01-09 20:47:45 +01:00
Kal Sze aa6c620249 More accurate terminology ("logger" instead of "logging handler") in logging documentation. 2020-01-09 15:27:34 +01:00
Jack Cushman eb629f4c02 Fixed #30995 -- Allowed converter.to_url() to raise ValueError to indicate no match. 2020-01-09 14:41:41 +01:00
KHMANJUNATH ceecd0556d Improved ReST formatting in docs/README.rst.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-01-09 14:10:27 +01:00
Hasan Ramezani eef3ea847e Fixed #31148 -- Added error messages on update()/delete() operations following union(), intersection(), and difference(). 2020-01-09 12:20:54 +01:00
Hasan Ramezani f600e3fad6 Fixed #21238 -- Fixed restoring attributes when pickling FileField and ImageField. 2020-01-09 09:37:59 +01:00
Hasan Ramezani aaea9deac4 Refs #21238 -- Added more tests for pickling FileField and ImageField. 2020-01-09 09:18:53 +01:00
Hasan Ramezani 66e16dcc99 Removed unused lines in ImageFieldTests.test_pickle(). 2020-01-09 08:44:39 +01:00
Someoneece 6c9c823e7a Renamed docs/README to README.rst. 2020-01-09 08:18:44 +01:00
Mike Yusko 0707ff6d36 Renamed set_language()'s next variable to avoid clash with builtin. 2020-01-09 07:54:18 +01:00
Claude Paroz 6686238cdc Refs #23919 -- Removed obsolete comment in signing.py 2020-01-08 17:50:29 +01:00