1
0
mirror of https://github.com/django/django.git synced 2025-04-07 15:06:47 +00:00

9530 Commits

Author SHA1 Message Date
Claude Paroz
33b5313d7c [2.1.x] Fixed #29301 -- Added custom help formatter to BaseCommand class
This partially reverts c3055242c81812278ebdc93dd109f30d2cbd1610.
Thanks Adam Johnson and Carlton Gibson for the reviews.
Backport of ce3351b9508896afdf87d11bd64fd6b5ad928228 from master.
2018-06-06 19:17:57 +02:00
Tim Graham
60aa235f43 [2.1.x] Fixed MySQL QuerySet.explain() test when running tests in reverse.
Backport of 13fe5a87f9554a6371f1d0914887bffcdf978a8a from master
2018-06-06 11:31:39 -04:00
Tim Graham
ae3ddce4e8 [2.1.x] Relaxed a GDAL raster test.
The exact metadata depends on the GDAL version.

Backport of 3dffcb5579a5a64f1869b9b46a379d519079d805 from master
2018-06-04 10:02:18 -04:00
Tim Graham
cc8ef63211 [2.1.x] Fixed #29461 -- Fixed ogrinspect test_time_field failure on SpatiaLite.
Backport of 666be7b9942611d5c0f5e485c448f219cd5a1ad5 from master
2018-06-02 07:33:09 -04:00
Tim Graham
93304b2269 [2.1.x] Fixed #29462 -- Fixed ogrinspect test failures with GDAL 2.2.
Backport of 55f4eee75d41499995bfdb611ac89e80c87404eb from master
2018-06-01 22:32:06 -04:00
Adam Donaghy
10a6d444af [2.1.x] Fixed #28462 -- Decreased memory usage with ModelAdmin.list_editable.
Regression in 917cc288a38f3c114a5440f0749b7e5e1086eb36.

Backport of b18650a2634890aa758abae2f33875daa13a9ba3 from master
2018-06-01 11:00:13 -04:00
Mariusz Felisiak
31b9cf97b9 [2.1.x] Refs #29416 -- Fixed GeoExpressionsTests.test_multiple_annotation() on MySQL 5.7+.
Failure introduced in b6e48f514ebe4e31b76e1750e043d4f296e645dc.

Backport of d0ad03cded64fc307b15668c81d0c65fd8486eff from master
2018-05-31 10:38:57 -04:00
Tim Graham
4ca64f2bd5 [2.1.x] Refs #28748 -- Reallowed lazy model field choices.
Regression in 3aa9ab39cce6b2a27d6334ad0148c8f37b6f5986.

Backport of c03e41712b2274f524d32bc2aef455ed82c9e3b4 from master
2018-05-29 21:43:56 -04:00
Paulo
25d4d8465b [2.1.x] Fixed #29230 -- Fixed nested prefetches that clash with descriptors.
Backport of 6104875a2cc797bbd1254aa61f22a9b03d652128 from master
2018-05-27 22:14:59 -04:00
Mariusz Felisiak
b6e48f514e [2.1.x] Fixed #29416 -- Removed unnecesary subquery from GROUP BY clause on MySQL when using a RawSQL annotation.
Regression in 1d070d027c218285b66c0bde8079034b33a87f11.
Backport of 4ab1f559e8d1264bcb20bb497988973194f5d8f2 from master
2018-05-27 18:25:42 -04:00
Ramiro Morales
c56d94c02a [2.1.x] Fixed #29417 -- Corrected two admin page titles for view-only users.
Backport of f40e71a957aa00b4572c19b269179cded6c8c500 from master
2018-05-27 16:38:26 -04:00
Daniel Hepper
13cb9d05a0 [2.1.x] Removed obsolete BaseHandler attributes.
Unused since d334f46b7a080fd3eb720141c19b37b10704a352.

Backport of 4e016d137236d36d47462f63e8f7988f1ad6c12e from master
2018-05-27 13:45:22 -04:00
Tim Graham
483f5d6c4f [2.1.x] Reverted "Fixed #29324 -- Made Settings raise ImproperlyConfigured if SECRET_KEY is accessed and not set."
This reverts commit b3cffde5559c4fa97625512d7ec41a674be26076 due to
a regression and performance concerns.

Backport of 5cc81cd9eb69f5f7a711412c02039b435c393135 from master
2018-05-26 21:07:19 -04:00
Xaroth Brook
39e61669e0 [2.1.x] Fixed #29415 -- Fixed detection of custom URL converters in included patterns.
Backport of 39283c8edbc5991b589d48a8e17152042193f2df from master
2018-05-26 20:29:29 -04:00
Ryan Rubin
6b91152a10 [2.1.x] Fixed #29400 -- Fixed crash in custom template filters that use decorated functions.
Regression in 620e9dd31a2146d70de740f96a8cb9a6db054fc7.

Backport of a8d12bc28069d56e0306770ab9c73738293663f7 from master
2018-05-25 11:12:03 -04:00
Paulo Alvarado
6cce05589d [2.1.x] Fixed #29414 -- Restored form inputs on admin inlines when the user doesn't have the change permission.
Regression in 825f0beda804e48e9197fcf3b0d909f9f548aa47.
Backport of ffb72a95bcd6fc5cce7915f3b3732a05837f29a2 from master
2018-05-18 22:37:33 -04:00
bakabiko
54b29e022d [2.1.x] Fixed #29380 -- Added support for QuerySet.select_for_update()'s nowait and skip_locked options on MySQL 8+.
Backport of a7bc1aea03508f544c9dfac0f34b01996653cef4 from master
2018-05-18 19:38:10 -04:00
olivierdalang
825f0beda8 Fixed #8936 -- Added a view permission and a read-only admin.
Co-authored-by: Petr Dlouhy <petr.dlouhy@email.cz>
Co-authored-by: Olivier Dalang <olivier.dalang@gmail.com>
2018-05-16 06:44:55 -04:00
Tim Graham
49a1736c2e Added assertion for admin change form's "save and continue editing" message. 2018-05-15 20:17:02 -04:00
Claude Paroz
a177f854c3
Fixed #16470 -- Allowed FileResponse to auto-set some Content headers.
Thanks Simon Charette, Jon Dufresne, and Tim Graham for the reviews.
2018-05-15 18:12:11 +02:00
Ryan P Kilby
2dcc5d629a Fixed #29392 -- Disallowed use of abbreviated forms of --settings and --pythonpath management command options. 2018-05-14 22:18:22 -04:00
Tim Graham
cae0107287 Increased the default PBKDF2 iterations for Django 2.1. 2018-05-13 20:06:20 -04:00
Claude Paroz
d65b0f72de Fixed #17379 -- Removed management commands deactivation of the locale. 2018-05-13 10:21:53 +02:00
Tim Graham
1e0cbc72e5
Moved to_language() to django.utils.translation.
Follow up to 1b7d524cfa7b7834af26c99407af66be6813938d.
2018-05-12 15:03:38 -04:00
Tim Graham
1b7d524cfa Consolidated duplicate to_locale() implementations.
Follow up to ac59ec8f1a34ea0e82bdb3c77422694e8016e0a7.
2018-05-12 12:58:21 -04:00
Hasan Ramezani
305dee7bf9 Increased django.utils.translation.trans_null test coverage. 2018-05-12 11:23:44 -04:00
Hasan Ramezani
ac59ec8f1a Aliased trans_null.to_locale() to trans_real.to_locale().
The implementations have unintentionally diverged.
2018-05-12 10:54:22 -04:00
Stefan R. Filipek
a5a2ceeb45 Fixed #27629 -- Added router.allow_relation() calls for assignments between unsaved model instances. 2018-05-10 20:42:44 -04:00
Claude Paroz
9c4ea63e87
Replaced TOKEN_* constants by TokenType enums.
Thanks Tim Graham for the review.
2018-05-10 17:51:51 +02:00
Maximilian Merz
78912ccd0e Fixed #21408 — German Translation for “3 days ago”
The problem:
“3 days ago” should translate to “vor 3 Tagen” in German, while “3 days” translates to “3 Tage”. #21408 describes that django always translated to “Tage”, even when the dative “Tagen” was correct. The same applies to months (“Monate”/“Monaten”) and years (“Jahre”/“Jahren”).

The solution:
Let `timesince` caller provide the string dict to use for the time-related strings.
2018-05-10 15:53:33 +02:00
Morgan Aubert
704443acac Fixed #29363 -- Added SimpleTestCase.assertWarnsMessage(). 2018-05-09 11:40:28 -04:00
Hasan Ramezani
7ba040de77 Added tests for trans_null.ngettext(). 2018-05-09 09:54:41 -04:00
Nicolas Noé
c629d4e956 Fixed #29389 -- Made Paginator reject non-integer page numbers of type float. 2018-05-09 09:28:52 -04:00
Nicolas Noé
2134e7d439 Refs #29389 -- Added Paginator test for float page number. 2018-05-09 09:23:05 -04:00
Nicolas Noé
c4158d050f Fixed #29370 -- Added choices to LogEntry.action_flag field. 2018-05-07 10:07:45 -04:00
Claude Paroz
523e04dfeb Captured logging in tests with self.assertLogs(). 2018-05-07 09:34:02 -04:00
Claude Paroz
607970f31c Replaced django.test.utils.patch_logger() with assertLogs().
Thanks Tim Graham for the review.
2018-05-07 09:34:00 -04:00
Sanket Saurav
079f324357 Fixed #28913 -- Fixed error handling when MIGRATIONS_MODULES specifies a nonexistent top-level package. 2018-05-05 18:26:33 -04:00
Samir Shah
10b44e4525 Fixed #26688 -- Fixed HTTP request logging inconsistencies.
* Added logging of 500 responses for instantiated responses.
* Added logging of all 4xx and 5xx responses.
2018-05-04 20:55:03 -04:00
Carlton Gibson
21fd8041c1
Refs #29358 -- Corrected wording in primary key check message. 2018-05-03 15:28:37 +02:00
Hasan Ramezani
816b8d9518 Fixed #29358 -- Added a system check to prohibit models with more than one primary_key field. 2018-05-03 09:08:29 +02:00
CHI Cheng
98019df855 Used double quotation marks for csrf form element. 2018-05-03 08:57:18 +02:00
CHI Cheng
4660ce5a69 Fixed #29375 -- Removed empty action attribute on HTML forms. 2018-05-02 09:20:04 -04:00
Zackary Troop
30f8642f2e Fixed #29350 -- Fix get_primary_key_column() method in sqlite3 backend
Thanks Tim Graham and Mariusz Felisiak for the reviews.
2018-04-28 12:01:45 +02:00
priyanshsaxena
6b3d292043 Fixed #29015 -- Added an exception if the PostgreSQL database name is too long. 2018-04-27 21:37:42 -04:00
Oscar Esgalha
6d1f576945 Fixed #29367 -- Fixed model state on objects with a primary key created with QuerySet.bulk_create(). 2018-04-27 17:57:38 -04:00
Nicolas Noé
3246ad1065 Fixed #27480 -- Added cache.touch(). 2018-04-27 17:48:35 -04:00
Claude Paroz
8e960c5aba Removed urllib2 reference in file storage tests 2018-04-27 14:02:39 +02:00
Claude Paroz
a9189d27ef Fixed #29353 -- Made StaticFilesHandler return a 404 response when settings.DEBUG is False 2018-04-25 10:38:13 +02:00
Tim Graham
c591bc3cce Fixed "invalid escape sequence" warning in runtests.py. 2018-04-24 12:06:04 -04:00