Commit Graph

9400 Commits

Author SHA1 Message Date
dzhuang e17088a108 Fixed #29213 -- Fixed autocomplete widget's translations for zh-hans/zh-hant. 2018-03-13 10:58:34 -04:00
robwa 4ab027b944 Fixed #28988 -- Fixed queries when a GenericRelation is used with multi-table inheritance. 2018-03-12 22:42:48 -04:00
Sergey Fedoseev d696fccae6 Fixed #29209 -- Fixed Cast() with TextField on MySQL and Oracle. 2018-03-12 21:57:14 -04:00
Mariusz Felisiak c3a1337dfa Refs #29004 -- Optimized InspectDBTransactionalTests.test_include_views() by limiting introspected tables. 2018-03-12 11:22:57 -04:00
Tim Graham 25b97ee170 Added functions for inspectdb table filtering in tests. 2018-03-12 11:15:13 -04:00
Carlton Gibson 5b083a824e Fixed #29180 -- Fixed a regression where migrations already in the plan were readded.
Regression in a38ae914d8.
2018-03-09 08:59:57 +01:00
Alex Stovbur 2d9ec4d735 Fixed #29188 -- Fixed ContentFile.size after a write(). 2018-03-08 14:07:29 -05:00
Simon Charette 277ed07209 Fixed #29195 -- Fixed Exists.output_field resolution on single-valued queries.
The Subquery class which Exists inherits from defaulted to using single-valued
querie's field if no output_field was explicitly specified on initialization
which was bypassing the Exists.output_field defined at the class level.

Moving Subquery's dynamic output_field resolution to _resolve_output_field
should make sure the fallback logic is only performed if required.

Regression in 08654a99bb.

Thanks Oli Warner for the detailed report.
2018-03-08 13:30:41 -05:00
Fabrizio Ettore Messina 10c0fe528a Fixed #29178 -- Allowed Index.fields to accept a tuple. 2018-03-08 10:56:55 -05:00
Tim Graham 911af0d24b Added more tests for django.utils.html.urlize(). 2018-03-06 08:30:41 -05:00
Tim Graham 97b7dd59bb Fixed CVE-2018-7537 -- Fixed catastrophic backtracking in django.utils.text.Truncator.
Thanks James Davis for suggesting the fix.
2018-03-06 08:30:40 -05:00
Tim Graham 8618271caa Fixed CVE-2018-7536 -- Fixed catastrophic backtracking in urlize and urlizetrunc template filters.
Thanks Florian Apolloner for assisting with the patch.
2018-03-06 08:30:40 -05:00
Alex Stovbur d171843f57 Fixed #28981 -- Added an exception if GeoIP database can't be loaded from the path. 2018-03-05 12:20:30 -05:00
Sergey Fedoseev 4ff29a53e6 Refs #17476 -- Removed obsolete simplification of timezone names in cache key generation. 2018-03-03 14:56:39 -05:00
Almad 3d8fadad0f Added model name to AutoField error message. 2018-03-03 13:22:00 -05:00
Patryk Zawadzki a20aae414e Fixed #29144 -- Made untranslated strings for territorial language variants use translations from the generic language variant. 2018-03-03 12:08:24 -05:00
Alex Tomic a1a3e51561 Fixed #29133 -- Fixed call_command() crash if a required option is passed in options. 2018-03-02 12:25:08 -05:00
Christophe Mehay 40bac28faa Fixed #29176 -- Fixed AbstractBaseUser.normalize_username() crash if username isn't a string. 2018-03-02 11:32:53 -05:00
François Freitag a2e97abd81 Fixed #29159 -- Made ModelChoiceIterator reuse QuerySet result cache.
When __len__() is called (e.g. when casting to list or tuple), the
QuerySet is evaluated and the result cache populated. iterator()
shouldn't be called on the QuerySet after that, as it would reset the
result cache and trigger a second query.
2018-03-01 14:17:56 -05:00
François Freitag 40f0aa9885 Fixed #29158 -- Fixed len(choices) crash if ModelChoiceField's queryset is a manager.
Removing all() in __iter__() prevents a duplicate query when choices are
cast to a list and there's a prefetch_related().
2018-03-01 14:12:14 -05:00
François Freitag 06172d7bc2 Consolidated ModelChoiceField tests. 2018-03-01 14:05:35 -05:00
Tim Graham 4c02e3cda3 Refs #27728 -- Made cosmetic edits to admin template tag template overriding. 2018-03-01 11:45:08 -05:00
Tomáš Ehrlich fa352626c2 Fixed #29172 -- Fixed crash with Window expression in a subquery. 2018-03-01 10:24:14 -05:00
Mariusz Felisiak 54f80430be
Fixed #29166 -- Fixed crash in When() expression with a list argument.
Thanks Matthew Pava for the report and Tim Graham and Carlton Gibson for
reviews.
Regression in 19b2dfd1bf.
2018-02-28 18:05:23 +01:00
Tim Graham 3fb718f17d Eliminated the need to modify a model forms test when new test files are added. 2018-02-28 10:26:26 -05:00
Raffaele Salmaso 5cc28dc752 Fixed #27728 -- Allowed overriding admin templatetags templates. 2018-02-28 08:49:40 +01:00
Tim Graham 5b589a47b9
Fixed #29161 -- Removed BCryptPasswordHasher from PASSWORD_HASHERS. 2018-02-26 09:05:18 -05:00
Becky Smith 8116e588db Fixed #17962 -- Added ModelAdmin.get_deleted_objects(). 2018-02-24 20:41:43 -05:00
Tim Graham 0fa6ab8c18 Tested the admin's delete_selected action when it receives nonexistent pks. 2018-02-24 09:21:13 -05:00
a8568730 ba37ee9ef8 Fixed #28635 -- Fixed admin's preserved filters if the URL contains non-ASCII characters. 2018-02-23 15:40:11 -05:00
Sebastian Sangervasi 7905815510 Fixed #27449 -- Added django.utils.translation.get_supported_language_variant(). 2018-02-23 14:49:00 -05:00
Hasan Ramezani 5033999153 Fixed #29154 -- Corrected examples in pluralize docstring and added tests. 2018-02-23 14:20:00 -05:00
bobort f82de6bfb1 Refs #28643 -- Added Ord, Chr, Left, and Right database functions. 2018-02-23 10:23:22 -05:00
Matthew Schinckel c412926a2e Fixed #29142 -- Fixed crash when OuterRef is used with an operator. 2018-02-23 09:38:16 -05:00
Mikhail Porokhovnichenko 14e34dcf8c Fixed #29132 -- Avoided connecting update_last_login() handler if User.last_login isn't a field. 2018-02-21 10:36:31 -05:00
Sebastian Sangervasi 5c4c87e55c Changed "language-code" to the more commonly used "language code". 2018-02-21 09:31:05 -05:00
Tom Forbes 33ac036a6b Fixed #28398 -- Added suggestions for mistyped management commands. 2018-02-21 09:00:49 -05:00
Sebastian Sangervasi f7b46f0b58 Removed unneeeded inner import in i18n tests. 2018-02-21 08:59:31 -05:00
Oliver Sauder 6f0b8c1c9e Fixed #28442 -- Fixed crash with nested OuterRefs that reference AutoField. 2018-02-20 21:58:43 -05:00
Chillar Anand e8e0cfa9e5 Fixed #28755 -- Made check_for_language() include apps' locale directories. 2018-02-20 21:34:40 -05:00
Williams Mendez 2691ed7ba1 Fixed #29140 -- Fixed EmailMessage crash when body is None. 2018-02-20 09:34:01 -05:00
Tim Graham 548f78ba46
Removed redundant lookup name in register_lookup() calls. 2018-02-19 13:12:13 -05:00
dizballanze eb002e7892 Fixed #29135 -- Prevented get_object/list_or_404() from hiding AttributeError raised by QuerySet filtering. 2018-02-19 10:51:15 -05:00
Dylan Verheul 9b1125bfc7 Fixed #28379 -- Made AccessMixin raise Permissiondenied for authenticated users. 2018-02-16 13:58:55 -05:00
Andreas Pelme e307ff29d2 Fixed #27810 -- Allowed query expressions in admin_order_field. 2018-02-15 21:00:31 -05:00
Herbert Parentes Fortes Neto d368784bac Fixed #28171 -- Added an exception if Form's empty_permitted and use_required_attribute arguments conflict. 2018-02-15 13:44:26 -05:00
Tim Graham e917ea6bec Fixed #29126 -- Doc'd the behavior of QuerySet.update_or_create() with manually specified pks. 2018-02-15 13:17:37 -05:00
Tomer Chachamu 7ec0fdf62a Fixed #28693 -- Fixed crash in CsrfViewMiddleware when an HTTPS request has an invalid host. 2018-02-14 20:24:01 -05:00
Haki Benita ff5517988a Fixed #28933 -- Improved the efficiency of ModelAdmin.date_hierarchy queries. 2018-02-14 19:15:41 -05:00
Haki Benita 98dd943893 Added tests for the date_hierarchy template tag. 2018-02-14 13:36:10 -05:00