Commit Graph

15518 Commits

Author SHA1 Message Date
Dan Watson e163effecc Fixed #29279 -- Added renderer argument to ModelForm. 2018-03-31 20:45:59 -04:00
Chris Lamb 84ad721bd9 Fixed #29275 -- Made assertFormError() output "(actual errors: none)" instead of "(actual errors: )". 2018-03-31 18:35:45 -04:00
Malte Gerth 874977d388 Fixed #29270 -- Fixed UserChangeForm crash if password field is excluded. 2018-03-29 15:25:54 -04:00
Simon Charette 2156565b5b Fixed #29245 -- Made autodetector treat field renames + db_column addition as RenameField. 2018-03-28 12:43:43 -04:00
Abeer Upadhyay 1bf4646f91 Fixed #29258 -- Added type checking for login()'s backend argument. 2018-03-28 10:10:18 -04:00
Mads Jensen 623117d1f1 Removed unnecessary variable in Lexer.create_token(). 2018-03-24 19:10:56 -04:00
Dan Watson 29150d5da8 Fixed #23406 -- Allowed migrations to be loaded from .pyc files. 2018-03-23 13:20:38 -04:00
Tim Graham a4f0e9aec7 Fixed #28718 -- Allowed user to request a password reset if their password doesn't use an enabled hasher.
Regression in aeb1389442.
Reverted changes to is_password_usable() from
703c266682 and documentation changes from
92f48680db.
2018-03-22 10:03:43 -04:00
Michael Sinov 9aca67bea8 Fixed #27533 -- Fixed inspectdb crash if a unique constraint uses an unsupported type. 2018-03-21 12:28:16 -04:00
Tim Graham a170dac887 Fixed too many parentheses in inspectdb Meta.unique_together output.
Regression in c76d87427d.
2018-03-21 10:39:36 -04:00
Tim Graham c76d87427d
Refs #23919 -- Removed obsolete comments about u'' prefixes. 2018-03-21 08:15:07 -04:00
Tim Graham ba76c3c45b Refs #27656 -- Removed "This will" prefix from djanog/templatetags/i18n.py docstrings. 2018-03-21 08:08:40 -04:00
Sergey Fedoseev 27ca5ce19f Used datetime.timezone.utc instead of pytz.utc for better performance. 2018-03-20 15:24:16 -04:00
Nick Pope 281c0223b3 Refs #29227 -- Simplified NullBooleanField by making it subclass BooleanField. 2018-03-20 12:10:10 -04:00
Tim Graham 6421bd702f Refs #29227 -- Made inspectdb generate BooleanField(null=True) rather than NullBooleanField. 2018-03-20 12:10:10 -04:00
Tim Graham 5fa4f40f45 Fixed #29227 -- Allowed BooleanField to be null=True.
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-20 12:10:10 -04:00
Peter Inglesby 73f7d1755f Extracted deserialize fk/m2m functions from Deserializer.
In preparation for handling forward references (refs #26291).
2018-03-20 12:07:39 -04:00
Astral a0c03c62a8 Fixed #29229 -- Fixed column mismatch crash when combining two annotated values_list() querysets with union(), difference(), or intersection().
Regression in 7316720603821ebb64dfe8fa592ba6edcef5f3e.
2018-03-19 21:05:43 -04:00
Mariusz Felisiak cede5111bb
Refs #28643 -- Added LPad and RPad database functions.
Thanks Tim Graham for the review.
2018-03-19 17:35:16 +01:00
Hasan Ramezani 274e3e27f3 Fixed #29184 -- Made TabularInline respect model form's Meta.labels and help_texts. 2018-03-17 20:51:24 -04:00
Claude Paroz 3c4ff21763 Fixed #29103 -- Removed bad 'b'-prefix added by MySQL's SchemaEditor.quote_value(). 2018-03-17 16:36:54 -04:00
Mads Jensen 77609f922e Removed unused args in Index.clone(). 2018-03-17 15:42:09 -04:00
Tim Graham f8b98f0edc Removed DatabaseFeatures.can_introspect_null.
The only known usage is in the unmaintained django-pymssql project.
2018-03-16 11:43:41 -04:00
Mariusz Felisiak 362813d628
Fixed hanging indentation in various code. 2018-03-16 10:54:34 +01:00
Mattia Procopio aeb8c38178 Fixed #29206 -- Fixed PasswordResetConfirmView crash when the URL contains a non-UUID where one is expected. 2018-03-15 21:33:15 -04:00
Josh Schneier b60e5fdbb7 Fixed #28959 -- Fixed 'No, take me back' button on admin's inline popup. 2018-03-15 20:47:18 -04:00
Mariusz Felisiak 9421aee35e
Refs #28643 -- Added LTrim, RTrim, and Trim database functions.
Thanks Tim Graham and Mads Jensen for reviews.
2018-03-15 20:57:23 +01:00
David Sanders 47bb3b68ff Fixed #29219 -- Made admin filters use processed params rather than request.GET. 2018-03-15 11:33:19 -04:00
Artem Tabolin a2f7433adc Fixed #29221 -- Corrected admin's autocomplete widget to add a space after custom classes. 2018-03-15 10:55:34 -04:00
Tim Graham 87dc0844a6 Fixed #29200 -- Fixed label rendering when using RadioSelect and CheckboxSelectMultiple with MultiWidget. 2018-03-15 09:10:23 -04:00
Mariusz Felisiak feb683c4c2
Fixed #29155 -- Fixed crash when database functions are used with pattern lookups.
Thanks Tim Graham and Sergey Fedoseev for reviews.
2018-03-14 10:00:07 +01:00
Hajime Nakagami 8f75984c26 Quoted field names in cache db backend SQL.
On Firebird, 'value' is a reserved word and must be quoted.
2018-03-13 22:46:41 -04:00
Mariusz Felisiak acfc650f2a
Fixed #29199 -- Fixed crash when database user password contains @ sign on Oracle.
Thanks Shane Allgeier for the report and Tim Graham for the review.
2018-03-13 19:06:40 +01:00
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
Alejandro Sánchez b639bcc250 Changed es_MX's THOUSAND_SEPARATOR to a comma. 2018-03-12 22:07:54 -04:00
Sergey Fedoseev d696fccae6 Fixed #29209 -- Fixed Cast() with TextField on MySQL and Oracle. 2018-03-12 21:57:14 -04:00
Tomer Chachamu c12745f682 Fixed typo in django/db/backends/base/schema.py. 2018-03-12 13:49:36 -04:00
Simon Charette 3c71fb3909 Added PatternLookup.prepare_rhs to simplify subclasses. 2018-03-12 12:12:46 -04:00
Дилян Палаузов 45aaf6608d Removed unused variable in BaseDatabaseSchemaEditor.effective_default(). 2018-03-12 12:06:06 -04:00
Sergey Fedoseev e17776e2cd Removed redundant UploadedFile.DEFAULT_CHUNK_SIZE.
The same value is inherited from File.
2018-03-12 09:12:44 -04:00
Sergey Fedoseev a5406fe989 Used cached_property for File.size. 2018-03-10 17:21:39 +05: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
Carlton Gibson 4d420a53cf Refs #29180 -- Added MigrationGraph._generate_plan() for testing. 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
Mariusz Felisiak 8b25d546b6 Simplified Contains, StartsWith, and EndsWith lookups. 2018-03-07 14:04:17 -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
ovalseven8 821e304cc4 Corrected User model docstring about required fields.
Follow up to 841a87785a.
2018-03-04 15:24:36 -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
Daniel Hahler 683341db43 Condensed some widgets code. 2018-03-03 13:35:09 -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
Carlton Gibson 94a180402c Refs #27728 -- Fixed thread safety of admin template tags.
Regression in 5cc28dc752.
2018-03-01 11:45:08 -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
Sergey Fedoseev ba4a986240 Refs #28459 -- Improved performance of time difference expressions on MySQL. 2018-03-01 14:42:21 +05:00
Claude Paroz 75527c0f83 Updated translations from Transifex
Forward port of 2126e9317e from stable/2.0.x.
2018-02-28 20:06:52 +01: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
Raffaele Salmaso 5cc28dc752 Fixed #27728 -- Allowed overriding admin templatetags templates. 2018-02-28 08:49:40 +01:00
Tim Graham 56a302f338 Fixed #29141 -- Corrected BCryptPasswordHasher's docstring about truncation. 2018-02-26 14:07:38 -05:00
Mariusz Felisiak 074a2f7f58
Refs #28909 -- Simplifed code using unpacking generalizations. 2018-02-26 18:23:31 +01:00
Tim Graham 5b589a47b9
Fixed #29161 -- Removed BCryptPasswordHasher from PASSWORD_HASHERS. 2018-02-26 09:05:18 -05:00
Mariusz Felisiak 61596f40ad Removed unnecessary setdefault() from CheckRegistry.register(). 2018-02-26 08:54:55 -05:00
Becky Smith 8116e588db Fixed #17962 -- Added ModelAdmin.get_deleted_objects(). 2018-02-24 20:41:43 -05:00
Tim Graham 9822d88ca0 Removed using argument from admin's get_deleted_objects(). 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
Tim Graham 16436f3751 Removed unused opts argument from admin's get_deleted_objects().
Unused since e12b3199d0.
2018-02-21 13:32:13 -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
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
Douwe Osinga 195610227d Updated project template to use single quotes where appropriate. 2018-02-20 18:52:28 -05:00
Williams Mendez 2691ed7ba1 Fixed #29140 -- Fixed EmailMessage crash when body is None. 2018-02-20 09:34:01 -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
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
Tim Graham fe99fb860f
Removed AuthenticationForm.get_user_id().
Unused since aab3a418ac.
2018-02-14 19:09:06 -05:00
Tim Graham f5c9bbd3e3
Made cosmetic edits to contrib.admin.filters. 2018-02-14 13:40:24 -05:00
Haki Benita 2014db50f4 Removed redundant filtering in date_hierarchy template tag.
cl.queryset is already filtered by the current selections.
2018-02-13 14:12:40 -05:00
Sanyam Khurana 5a669ae2f4 Fixed #29106 -- Made DiscoverRunner display selected test tags. 2018-02-13 12:56:31 -05:00
Denys Duchier cb7860cced Fixed #24607 -- Serialized natural keys in multi-table inheritance models.
Thanks João Paulo Melo de Sampaio for the test.
2018-02-12 21:15:04 -05:00
Tim Graham 9ba3df8240 Refs #29125 -- Made Q.deconstruct() omit 'query_utils' in the path and _connector='AND' since it's a default value. 2018-02-12 15:23:41 -05:00
Tim Graham b95c49c954 Fixed #29125 -- Made Q.deconstruct() deterministic with multiple keyword arguments. 2018-02-12 14:52:32 -05:00
Tim Graham b8a41a2872 Refs #27795 -- Removed force_bytes() in django.test.client where possible. 2018-02-12 11:03:11 -05:00