Commit Graph

9500 Commits

Author SHA1 Message Date
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
Claude Paroz 3aae43d800 Fixed #28973 -- Silenced copying/linking messages in collectstatic's default verbosity. 2018-04-23 23:04:02 -04:00
François Freitag d1413c5d70 Refs #28312 -- Added an optimized __bool__() to ModelChoiceIterator.
COUNT is more expensive than EXISTS; use the latter when possible.
2018-04-23 13:03:07 -04:00
François Freitag 3fca95e1ad Fixed #28312 -- Made ModelChoiceIterator.__len__() more memory-efficient.
Instead of loading all QuerySet results in memory, count the number of
entries. This adds an extra query when list() or tuple() is called on the
choices (because both call __len__() then __iter__()) but uses less
memory since the QuerySet results won't be cached. In most cases, the
choices will only be iterated on, meaning that __len__() won't be called
and only one query will be executed.
2018-04-23 12:39:43 -04:00
Hasan Ramezani b33f10d8cc Refs #29131 -- Made ArrayField error messages index from 1 instead of 0. 2018-04-22 22:18:46 -04:00
Hasan Ramezani dd68b51e1d Fixed #29295 -- Fixed management command crash when using subparsers.
Thanks Tim Graham for the fix.
2018-04-21 17:33:17 -04:00
orlnub123 21420096c4 Fixed #29247 -- Allowed blank model field choice to be defined in nested choices. 2018-04-20 11:06:14 -04:00
Tim Graham e35004966b Moved tests for model Field.get_choices(). 2018-04-20 11:05:25 -04:00
Adnan Umer 534d8d875e Fixed #28600 -- Added prefetch_related() support to RawQuerySet. 2018-04-19 13:48:27 -04:00
Adnan Umer f2026ca5e2 Fixed #29337 -- Added __len__() & __bool__() to RawQuerySet. 2018-04-19 12:46:31 -04:00
Adnan Umer ec0319ff82 Fixed #29339 -- Added result caching to RawQuerySet. 2018-04-19 11:35:49 -04:00
Tom c1c163b427 Fixed #28574 -- Added QuerySet.explain(). 2018-04-19 10:52:19 -04:00
Nick Pope df90e462d9 Fixed #29212 -- Doc'd redirect loop if @permission_required used with redirect_authenticated_user. 2018-04-19 10:21:24 -04:00
Tim Graham a917a5601f Refs #23890 -- Removed numpy deprecation warning silencing.
Obsolete since numpy 1.12.0.
2018-04-18 22:09:26 -04:00
Tim Graham 7a22d9f751
Fixed a test failure with the latest GeoIP2 database. 2018-04-17 21:30:05 -04:00
Brett Cannon 64b74804c5 Fixed #29334 -- Updated pypi.python.org URLs to pypi.org. 2018-04-17 20:24:27 -04:00
Jon Dufresne b3cffde555 Fixed #29324 -- Made Settings raise ImproperlyConfigured if SECRET_KEY is accessed and not set. 2018-04-17 13:02:05 -04:00
Tim Graham fff689ed98 Added a test for a settings error message. 2018-04-17 12:55:26 -04:00
Chris Jerdonek fdc936c913 Fixed #29253 -- Made method_decorator(list) copy attributes. 2018-04-16 13:38:37 -04:00
Tim Graham a480ef89ad Fixed inconsistent formatting in tests/modeladmin/test_checks.py. 2018-04-16 13:35:40 -04:00
Chris Jerdonek 09f1f0387b Updated decorators test to use subTest(). 2018-04-16 12:48:01 -04:00
Daniel Miller 60156750f6 Fixed #29330 -- Fixed crash when pickling BaseExpression.
Regression in cfff2af02b.
2018-04-16 10:15:13 -04:00
Alex Gaynor 9a56b4b13e Fixed #27863 -- Added support for the SameSite cookie flag.
Thanks Alex Gaynor for contributing to the patch.
2018-04-13 20:58:31 -04:00
Matthias Kestenholz 13efbb233a Fixed #29322 -- Made admin check all ModelAdmin fieldsets for duplicates. 2018-04-13 11:08:30 -04:00
Mariusz Felisiak 0b66c3b442
Fixed #29286 -- Fixed column mismatch crash with QuerySet.values() or values_list() after combining an annotated and unannotated queryset with union(), difference(), or intersection().
Regression in a0c03c62a8.

Thanks Tim Graham and Carlton Gibson for reviews.
2018-04-13 12:15:52 +02:00
Flávio Juvenal e1f13f1551 Fixed #29320 -- Added an exception when an annotation alias matches a ForeignKey attname. 2018-04-12 21:15:40 -04:00
Tim Graham 78f8b80f9b Fixed schema test failure when running tests in reverse.
Follow up to 003334f8af.
2018-04-12 13:59:02 -04:00
Paul Donohue 33a0b7ac81 Fixed #29296 -- Fixed crashes in admindocs when a view is a callable object. 2018-04-12 13:11:08 -04:00
Jeremy Bowman ee17bb8a67 Fixed #29193 -- Prevented unnecessary foreign key drops when altering a unique field.
Stopped dropping and recreating foreign key constraints on other fields
in the same table as the one which is actually being altered in an
AlterField operation.

Regression in c3e0adcad8.
2018-04-11 23:17:11 -04:00
Jeremy Bowman 003334f8af Tested altering a unique field when a reverse M2M relation exists. 2018-04-11 23:17:11 -04:00
David Foster c3055242c8 Fixed #29301 -- Made management command --help display command-specific arguments before common arguments. 2018-04-11 13:52:20 -04:00