Commit Graph

9500 Commits

Author SHA1 Message Date
Mariusz Felisiak aad1833fa0
Refs #20487 -- Added test for querying mixed case fields with common related model.
Thanks Shai Berger for the review.
2018-01-20 20:48:01 +01:00
Jon Dufresne 47d238b696 Fixed #29041 -- Changed SelectMultiple's multiple attribute to HTML5 boolean syntax. 2018-01-20 11:19:06 -05:00
Jon Dufresne 3c34452ab5 Refs #23668 -- Removed passing default argument of current TZ to make_aware()/naive. 2018-01-18 11:21:12 -05:00
Mads Jensen 65728550bd Refs #28643 -- Added Replace database function. 2018-01-17 20:46:15 -05:00
Vincent Poulailleau fcd431c6c3 Improved generic detail view error message for when pk or slug is missing. 2018-01-17 10:58:05 -05:00
hayashi 27557a7a99 Fixed #28857 -- Fixed invalid SQL when using Cast with complex expressions on PostgreSQL. 2018-01-17 09:28:03 -05:00
Mads Jensen 999fc0687d Added a few tests for smtp EmailBackend. 2018-01-15 12:25:17 -05:00
Mads Jensen 59b1aaa5a5 Added a couple tests for collectstatic. 2018-01-15 11:15:14 -05:00
Tim Martin 02365d3f38 Fixed #28542 -- Fixed deletion of primary key constraint if the new field is unique. 2018-01-13 20:11:55 -05:00
Étienne Loks 9a621edf62 Fixed #29016 -- Fixed incorrect foreign key nullification on related instance deletion. 2018-01-13 10:31:00 -05:00
Tim Graham b17c1d53fd
Removed unused query log clearing in bulk_create tests. 2018-01-12 18:44:36 -05:00
Дилян Палаузов a38ae914d8 Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements. 2018-01-12 12:44:50 -05:00
Tim Graham 4bcec02368 Added tests for django.forms.formsets.all_valid(). 2018-01-12 12:40:21 -05:00
Jon Dufresne 1e81a4b897 Fixed #28638 -- Made allowed_hosts a required argument of is_safe_url(). 2018-01-11 07:03:50 -05:00
Fabio Bonelli f636f0bb86 Fixed #29007 -- Fixed DecimalValidator crash on NaN, SNan, Inf, and Infinity values. 2018-01-10 21:43:32 -05:00
Fabio Bonelli c886f3dee3 Fixed #29006 -- Fixed DecimalField.clean() crash on sNaN values. 2018-01-10 20:30:44 -05:00
Tim Graham 1c95737ebe Reduced redundancy in DecimalField tests with subTest(). 2018-01-10 20:30:24 -05:00
Mads Jensen a613feb5d3 Completed test coverage for ModelDetailView. 2018-01-10 12:13:04 -05:00
George-Cristian Bîrzan e2908ecb3e Added more tests for HttpRequest.build_absolute_uri(). 2018-01-10 11:32:19 -05:00
Tim Graham 366451880a Updated HttpRequest.build_absolute_uri() tests to use subTest(). 2018-01-10 11:32:15 -05:00
Tim Graham 66d74676e2 Fixed a GeoIP2 test failure with the latest GeoIP2 database. 2018-01-10 09:39:41 -05:00
Will Ayd 09530e61a0 Fixed #28869 -- Made tagged test classes and methods inherit tags from parents. 2018-01-08 20:57:33 -05:00
Alvin Lindstam 47a99d7012 Fixed #28989 -- Fixed HttpResponse.delete_cookie() for cookies that use __Secure/Host prefixes. 2018-01-08 12:32:47 -05:00
Tim Graham 8e94f9f7dd Moved HttpResponse.set_cookie() tests to an appropriate location. 2018-01-08 12:01:59 -05:00
Mariusz Felisiak 8f8a93a9ae
Fixed #28859 -- Made Oracle backend raise DatabaseError if "no data found" exception is hidden by the Oracle OCI library.
Thanks Tim Graham for the review and Jani Tiainen for the report.
2018-01-06 18:50:54 +01:00
Vasilis Aggelou 777f216d55 Fixed #15522 -- Added ModelAdmin.delete_queryset() to customize "delete selected objects" deletion. 2018-01-05 18:28:45 -05:00
Tim Graham ec2ce4517a Fixed #28882 -- Fixed cleaning of disabled MultiValueFields.
Thanks avalanchy for the initial patch.
2018-01-05 15:49:54 -05:00
shanghui 3333d935d2 Fixed #28757 -- Allowed using contrib.auth forms without installing contrib.auth.
Also fixed #28608 -- Allowed UserCreationForm and UserChangeForm to
work with custom user models.

Thanks Sagar Chalise and Rômulo Collopy for reports, and Tim Graham
and Tim Martin for reviews.
2018-01-05 14:47:37 -05:00
Paulo d1286a8a68 Fixed #28517 -- Fixed admin delete confirmation view crash when related models don't have a delete permission. 2018-01-04 19:07:46 -05:00
Tim Graham 8e1a7dab4b Reorganized test_runner test apps. 2018-01-04 15:41:33 -05:00
Дилян Палаузов d7b2aa24f7 Fixed #28982 -- Simplified code with and/or. 2018-01-03 20:12:23 -05:00
Jonas Haag 602481d0c9 Fixed #28986 -- Prevented boolean values in admin list display from being formatted with thousand separators. 2018-01-03 15:02:06 -05:00
Jonas Haag ea10efebfa Added display_for_value() tests for boolean values. 2018-01-03 15:02:00 -05:00
Tim Graham acc8dd4142
Fixed #28984 -- Made assorted code simplifications. 2018-01-03 13:24:02 -05:00
Claude Paroz b3cd9fb18b Refs #15902 -- Made set_language() view always set the current language in a cookie.
The plan is to later deprecate/remove storing the language in the session.
2018-01-03 11:25:40 -05:00
я котик пур-пур ccc25bfe4f Refs #23919 -- Removed obsolete __init__.py files in management command directories. 2018-01-03 11:02:26 -05:00
shanghui cc6bcc6ff5 Fixed #28867 -- Added system check for a model property that clashes with a related field accessor. 2018-01-03 10:34:31 -05:00
Robin Ramael fbf647287e Fixed #28811 -- Fixed crash when combining regular and group by annotations. 2018-01-03 08:24:16 -05:00
Alvin Lindstam 2cb6b7732d Fixed #28902 -- Fixed password_validators_help_text_html() double escaping. 2018-01-02 19:51:06 -05:00
Tim Graham ab7f4c3306 Refs #28965 -- Deprecated unused django.utils.http.cookie_date(). 2018-01-02 11:23:04 -05:00
Alexey 0afffae4ec Fixed #28965 -- Updated Set-Cookie's Expires date format to follow RFC 7231. 2018-01-02 11:22:59 -05:00
Tim Graham 5f456408a0 Refs #28930 -- Simplified schemas test with any(). 2018-01-02 10:11:48 -05:00
Simon Charette f5a989e603 Fixed #28974 -- Made refresh_from_db() hint routers about its instance. 2018-01-02 09:42:24 -05:00
Tim Graham d065c92678
Fixed #28918 -- Fixed Model.refresh_from_db() for instances hidden by the default manager. 2017-12-30 18:00:36 -05:00
Simon Charette dcdd219ee1 Fixed #25817 -- Made RenameField repoint to_field/to_fields references.
Also updated the autodetector to assume the RenameField operation will
perform the required repointing.
2017-12-30 14:59:22 -05:00
Sergey Fedoseev 1490611038 Fixed #28908 -- Allowed ArrayField lookups on ArrayAgg annotations. 2017-12-30 14:46:52 -05:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 58ec55b157 Fixed #28117 -- Added a helpful message in loaddata when psycopg2 can't load a fixture due to NUL characters. 2017-12-30 12:16:11 -05:00
Tomer Chachamu 9bc4d90d1a Fixed #14642 -- Fixed generic inline formsets crash when using save_as_new=True. 2017-12-30 11:38:11 -05:00
Jon Dufresne da82939e5a Fixed #28912 -- Made EmailMessage.message() omit an empty To header. 2017-12-30 09:38:03 -05:00
Jon Dufresne b03d500295 Fixed #28971 -- Made EmailMessage.message() set Cc from headers dict if it exists. 2017-12-30 09:37:59 -05:00
Jon Dufresne 6334939417 Tested passing To/Cc/Reply-To in EmailMessage(headers=...) without the corresponding argument. 2017-12-29 12:50:31 -05:00
shanghui b0a2a2b07e Made a few cleanups to invalid_models_tests.test_models. 2017-12-29 10:32:01 -05:00
Sergey Fedoseev ae6fa914aa Fixed #28926 -- Fixed loss of precision of big DurationField values on SQLite and MySQL. 2017-12-28 17:35:41 -05:00
Tim Graham 46d1af2e82
Moved generic_inlineformset_factory() tests to a separate file. 2017-12-28 17:17:47 -05:00
Mariusz Felisiak 83a36ac49a
Removed unnecessary trailing commas and spaces in various code. 2017-12-28 21:07:29 +01:00
Tim Graham 058d112ed2 Refs #27175 -- Removed an obsolete test comment and DEBUG=True.
As of e62165b898, {% include %}
doesn't silence exceptions.
2017-12-28 14:57:06 -05:00
Sergey Fedoseev aefe624c62 Fixed #28841 -- Added ForcePolygonCW GIS function and deprecated ForceRHR. 2017-12-27 19:26:14 -05:00
Sergey Fedoseev 44908d4d93 Fixed #28967 -- Prevented Cast to FloatField from rounding to integer on MySQL. 2017-12-27 19:16:37 -05:00
hui shang f1aa58479c Fixed #28714 -- Added system checks for invalid model field names in Meta.indexes.
Thanks Gabriel for the report and Adam Johnson for the review.
2017-12-27 18:56:24 -05:00
Mariusz Felisiak 1d00923848
Refs #28958 -- Added a test for ModelAdmin with query expressions in ordering.
This provides additional test coverage but isn't a regression test for
the ticket's issue.
2017-12-27 19:47:14 +01:00
Mariusz Felisiak c815213740
Fixed #28958 -- Fixed admin changelist crash when using a query expression in the page's ordering.
Thanks Tim Graham for the review.
2017-12-27 18:38:30 +01:00
Ran Benita c21f158295 Fixed #28944 -- Fixed crash when chaining values()/values_list() after QuerySet.select_for_update(of=()). 2017-12-26 11:41:17 -05:00
Tim Martin 5778b5701d Fixed #28731 -- Added an error message when using an empty Q() in a When expression.
Otherwise it generates invalid SQL.
2017-12-26 10:39:47 -05:00
Claude Paroz 23b21db31b Fixed #28594 -- Removed Jython docs and specific code
Thanks Andrey Martyanov for the reporti, and Tim Graham for the review.
2017-12-23 10:26:32 +01:00
Cameron Curry 622ead6aaf Fixed #28937 -- Allowed BinaryField to be editable=True. 2017-12-22 16:31:46 -05:00
Simon Charette 9f7772e098 Fixed #28884 -- Fixed crash on SQLite when renaming a field in a model referenced by a ManyToManyField.
Introspected database constraints instead of relying on _meta.related_objects
to determine whether or not a table or a column is referenced on rename
operations.

This has the side effect of ignoring both db_constraint=False and virtual
fields such as GenericRelation which aren't backend by database level
constraints and thus shouldn't prevent the rename operations from being
performed in a transaction.

Regression in 095c1aaa89.

Thanks Tim for the additional tests and edits, and Mariusz for the review.
2017-12-22 15:19:05 -05:00
Sergey Fedoseev ebc4ee3369 Refs #23941 -- Prevented incorrect rounding of DecimalField annotations on SQLite. 2017-12-21 19:50:56 -05:00
Tilmann Becker 01384ce36c Fixed #28947 -- Fixed crash when coercing a translatable URL pattern to str.
Regression in df41b5a05d.
2017-12-20 20:36:41 -05:00
Tim Graham 04d1454350 Moved unnecessary inner imports in admin_scripts tests. 2017-12-20 14:52:20 -05:00
Tim Graham e7b804c060 Fixed #28941 -- Fixed crash in testserver command startup.
Regression in 2b09e4c88e.
2017-12-20 14:38:06 -05:00
Mariusz Felisiak fc9eec7bb7 Fixed #28934 -- Prevented Cast from truncating microseconds on Oracle. 2017-12-20 11:05:27 -05:00
Mariusz Felisiak 4420761ea9
Fixed #28727 -- Fixed Cast crash on SQLite when casting a Python date/datetime to Date/DateTimeField. 2017-12-19 19:54:58 +01:00
Tim Graham 770b9ea77f Fixed #25277 -- Restored test dependency to the original python-memcached. 2017-12-18 10:37:43 -10:00
Sergey Fedoseev 6fd6d8383f Fixed #28915 -- Prevented SQLite from truncating trailing zeros in the fractional part of DecimalField.
This reverts commit a146b65628 and adds
a test for the regression.
2017-12-12 21:57:41 -10:00
Rodrigo Pinheiro Marques de Araújo 30a389bd77 Fixed #28898 -- Corrected admin check to allow a OneToOneField in ModelAdmin.autocomplete_fields. 2017-12-13 02:39:27 -05:00
Sergey Fedoseev da71e4bb08 Fixed #28896 -- Reallowed filtering a queryset with GeometryField=None.
Regression in 58da81a5a3.
2017-12-12 17:12:04 -10:00
Sergey Fedoseev 10bfa876be Refs #27985 -- Reallowed using __exact=None as an alias for __isnull=True if a custom lookup class with lookup_name != None is registered as the exact lookup.
Regression in 58da81a5a3 and prerequisite
for refs #28896.
2017-12-12 17:11:58 -10:00
Daniil 7c7bc6391a Fixed #28874 -- Prevented double escaping of errors on hidden form fields. 2017-12-11 07:30:47 -05:00
Morgan Wahl a9e5ac823d Refs #28856 -- Added test for caching of a GenericForeignKey pointing to a model that uses more than one level of MTI.
Forwardport of test and release notes of
3522203502 from stable/1.11.x
2017-12-08 14:06:28 -05:00
Nick Pope 81abece192 Corrected type of MESSAGE_TAGS setting override in tests. 2017-12-08 13:18:31 -05:00
geekodour c6864a01b2 Fixed #28791 -- Allowed commands that don't require settings to work if the DJANGO_SETTINGS_MODULE doesn't exist. 2017-12-07 14:19:18 -05:00
Tim Graham a862af3839
Fixed #28893 -- Removed unnecessary dict.items() calls. 2017-12-06 17:17:59 -05:00
Sergey Fedoseev 183fb7b2b9 Fixed #28870 -- Added support for functools.partialmethod serialization in migrations. 2017-12-06 14:49:37 -05:00
Mariusz Felisiak fc48047586
Refs #28876 -- Fixed incorrect foreign key constraint name for models with quoted db_table.
Thanks Simon Charette and Tim Graham for the review and Carlos E. C.
Leite for the report.
2017-12-05 21:11:20 +01:00
Mariusz Felisiak f79d9a322c
Refs #28876 -- Fixed incorrect class-based model index name generation for models with quoted db_table.
Thanks Simon Charette and Tim Graham for the review and Carlos E. C.
Leite for the report.
2017-12-05 21:05:10 +01:00
Nick Pope e014f91a70 Fixed #28890 -- Removed newlines between MultiWidget's subwidgets.
Regression in b52c73008a.
2017-12-05 11:22:36 -05:00
Дилян Палаузов d2afa5eb23 Fixed #28860 -- Removed unnecessary len() calls. 2017-12-04 10:35:23 -05:00
Tim Graham 7664fe2759 Refs #28871 -- Fixed admin_views selenium test failure. 2017-12-02 09:54:31 -05:00
Tim Graham 81057645f6 Fixed #28871 -- Fixed initialization of autocomplete widgets in "Add another" inlines.
Also allowed autocomplete widgets to work on AdminSites with a name other
than 'admin'.
2017-12-01 22:14:32 -05:00
Simon Charette 095c1aaa89 Fixed #28849 -- Fixed referenced table and column rename on SQLite.
Thanks Ramiro for the input and Tim for the review.
2017-12-01 22:12:24 -05:00
Tim Graham 474bd7a5d4 Used a separate admin site for autocomplete tests. 2017-12-01 21:57:05 -05:00
Sergey Fedoseev cf12257db2 Fixed #28863 -- Fixed filter on annotation that contains Q. 2017-12-01 21:48:49 -05:00
Tim Graham c3e0adcad8 Fixed #28305 -- Fixed "Cannot change column 'x': used in a foreign key constraint" crash on MySQL with a sequence of AlterField or RenameField operations.
Regression in 45ded053b1.
2017-12-01 19:07:46 -05:00
Vasiliy Bolshakov 03974d8122 Fixed #28866 -- Made InlineAdminFormSet include InlineModelAdmin's Media before its formset's Media.
This provides better backwards compatibility following refs #28377.
2017-11-30 20:15:28 -05:00
Simon Charette e50add6ca1 Fixed #28856 -- Fixed a regression in caching of a GenericForeignKey pointing to a MTI model.
Regression in b9f8635f58.
2017-11-30 09:28:44 -05:00
Mads Jensen f0a68c2511 Fixed #28702 -- Made query lookups for CIText fields use citext. 2017-11-29 10:35:37 -05:00
Simon Charette 78c5e7b90e Fixed #28834 -- Followed ancestor links on field cache lookup failure.
Thanks Tim for the review.
2017-11-29 01:28:39 -05:00
Nicolas Delaby 746caf3ef8 Fixed #28837 -- Fixed test client crash if an exception with more than one arg is raised.
Also removed usage of the problematic pattern elsewhere.

Regression in 6e55e1d88a.
2017-11-28 18:55:23 -05:00
Jon Dufresne 7a6fbf36b1 Fixed #28853 -- Updated connection.cursor() uses to use a context manager. 2017-11-28 11:28:09 -05:00
Raphael Michel 616f468760 Fixed #28848 -- Fixed SQLite/MySQL crash when ordering by a filtered subquery that uses nulls_first/nulls_last. 2017-11-27 11:35:44 -05:00
Sergey Fedoseev 93cdd07e8f Used bytes.hex() and bytes.fromhex() to simplify. 2017-11-23 08:52:23 -05:00
Yan Mitrofanov 54e5c4a00e Fixed #28820 -- Eliminated an extra query with QuerySet.update() on proxy models. 2017-11-21 12:11:47 -05:00
Dražen Odobašić d97f026a7a Fixed #28817 -- Made QuerySet.iterator() use server-side cursors after values() and values_list(). 2017-11-21 10:33:56 -05:00
Tim Graham 6cb6382639 Added assertion helpers for PostgreSQL's server-side cursor tests. 2017-11-21 08:21:09 -05:00
Tim Graham e3c852cbd6
Fixed #28804 -- Fixed "Unknown system variable 'transaction_isolation'" on MariaDB.
Regression in 967450a3bf.
2017-11-20 10:08:34 -05:00
Krzysztof Nazarewski 244cc40155 Fixed #26184 -- Allowed using any lookups in ModelAdmin.search_fields.
Thanks Krzysztof Nazarewski for the initial patch.
2017-11-18 19:33:52 -05:00
Tim Graham 9d1d3b2d2f Refs #28814 -- Fixed test_runner failure on Python 3.7.
Due to https://bugs.python.org/issue30399.
2017-11-17 16:13:23 -05:00
Tim Graham 9bea555d06 Fixed test failures due to ordering differences on PostgreSQL 10. 2017-11-15 09:37:18 -05:00
Simon Charette ee85ef8315 Fixed #28792 -- Fixed index name truncation of namespaced tables.
Refs #27458, #27843.

Thanks Tim and Mariusz for the review.
2017-11-14 21:36:25 -05:00
Tim Graham 532a4f22ad Fixed invalid escape sequence warning in check_framework test. 2017-11-14 19:05:20 -05:00
Sergey Fedoseev 967450a3bf Fixed #28794 -- Fixed tx_isolation deprecation warning on MySQL 5.7.20+. 2017-11-14 15:40:44 -05:00
Дилян Палаузов 23bf4ad87f Fixed #28795 -- Removed 'not in' checks and used dict.setdefault(). 2017-11-14 10:52:52 -05:00
Sergey Fedoseev b5ecbf1e12 Simplified choices iterators in tests.model_fields.models. 2017-11-13 13:11:07 -05:00
Mariusz Felisiak 2d3cc94284
Fixed #28781 -- Added QuerySet.values()/values_list() support for union(), difference(), and intersection().
Thanks Tim Graham for the review.
2017-11-12 14:28:11 +01:00
shanghui 1907fc9b12 Fixed #28534 -- Made JSONField.has_changed() ignore key order and consider True/1 values as different. 2017-11-11 19:45:23 -05:00
Paulo ee49306176 Fixed #27710 -- Made Model.save() invalidate cached, stale relations after a primary key assignment. 2017-11-09 11:40:34 -05:00
shanghui ebb998976e Fixed #28751 -- Corrected the error message for inactive users in AdminAuthenticationForm.
Thanks SeungWon Kang for the report and Tim Graham for the review.
2017-11-08 09:39:12 -05:00
shanghui 359370a8b8 Fixed #28645 -- Reallowed AuthenticationForm to raise the inactive user error when using ModelBackend.
Regression in e0a3d93730.

Thanks Guilherme Junqueira for the report and Tim Graham for the review.
2017-11-08 09:39:12 -05:00
Claude Paroz 0cf00769ad Fixed #28585 -- Calculated admin's change form multipart context variable from forms and formsets
Thanks Tim Graham for the review.
2017-11-07 19:06:32 -05:00
Bjorn Kristinsson ac6a4eb9f9 Fixed #28719 -- Added a helpful exception if MultipleObjectTemplateResponseMixin doesn't generate any template names. 2017-11-07 18:46:52 -05:00
Jonas Haag a2851f204c Fixed #28720 -- Added HttpRequest.get_full_path_info(). 2017-11-07 15:58:05 -05:00
Imran Iqbal 3e7497a05e Fixed #28758 -- Fixed RangeMax/MinValueValidators crash with unbound ranges. 2017-11-07 15:07:03 -05:00
Claude Paroz 1b7780ea08 Fixed #28544 -- Made unlocalize template filter behave like {% localize off %} tag
Thanks Beda Kosata for the report and Tim Graham for the review.
2017-11-07 20:48:15 +01:00
Chris Lamb 998c9dd599 Fixed #28663 -- Add a check for likely incorrectly migrated django.urls.path() routes. 2017-11-07 11:39:59 -05:00
Дилян Палаузов 6c0042430e Fixed #28776 -- Fixed a/an/and typos in docs and comments. 2017-11-06 22:41:03 -05:00
Yusuke Miyazaki 278d66b94b Fixed #28501 -- Fixed "python -m django runserver" crash. 2017-11-06 09:58:15 -05:00
Yusuke Miyazaki ac21f2e391 Added RestartWithReloaderTests. 2017-11-06 09:54:31 -05:00
Sergey Fedoseev 69922d303d Refs #17448 -- Fixed GeoModelTest.test_raw_sql_query.
The test was a false positive.
2017-11-04 10:08:26 -04:00
Tom b81905bfd4 Fixed #28571 -- Added a prompt to bypass password validation in createsuperuser. 2017-11-03 20:00:08 -04:00
Tim Graham 872be5976d Improved technique for matching input prompts in contrib.auth management tests. 2017-11-03 20:00:08 -04:00
Mike Hansen 514b2c989a Fixed #28723 -- Fixed RelatedManager's prefetch_related() cache name. 2017-11-02 10:06:00 -04:00
Michał Pasternak e554b72a2a Fixed #28749 -- Added subquery support for ArrayField's __in lookup. 2017-11-01 15:12:18 -04:00
Charlie Denton cbe334918a Fixed #28750 -- Allowed models to define Meta.manager_inheritance_from_future for backwards compatibility.
Refs 631f4ab061.
2017-10-31 13:22:27 -04:00
Adam Johnson acc989f037 Fixed #28760 -- Removed DummyCache's unnecessary get/set/delete_many(). 2017-10-31 12:16:09 -04:00
Rajesh Veeranki 5e1a356060 Fixed typo in tests/many_to_many/tests.py. 2017-10-31 10:21:02 -04:00
Paulo fcfcf8aae4 Fixed #28742 -- Fixed AttributeError crash when assigning None to cached reverse relations. 2017-10-30 14:02:03 -04:00
Adam Johnson abacd09f07 Refs #27318 -- Made DummyCache.set_many() return a list for consistency with other backends. 2017-10-30 12:13:17 -04:00
Ran Benita 03049fb8d9 Refs #28010 -- Allowed reverse related fields in SELECT FOR UPDATE .. OF.
Thanks Adam Chidlow for polishing the patch.
2017-10-28 20:33:42 -04:00
Srinivas Reddy Thatiparthy 55b5393bd2 Fixed #28474 -- Made DurationField raise ValidationError for inputs that raised OverflowError. 2017-10-25 18:05:13 -04:00
Mariusz Felisiak 81e357a7e1 Fixed #28689 -- Fixed unquoted table names in Subquery SQL when using OuterRef.
Regression in f48bc7c3db.
2017-10-25 21:52:38 +02:00
Ryan Verner 9473a8481a Fixed #28740 -- Added 'continent_code' and 'continent_name' in GeoIP2.city() dict. 2017-10-25 10:07:37 -04:00
medmunds d1317edad0 Fixed #28739 -- Fixed get_fixed_timezone() for negative timedeltas. 2017-10-24 21:27:53 -04:00
Tim Graham 8b9a163afa Refs #28688 -- Updated a selenium test for admin's URLify.js change.
English words aren't removed if non-ASCII chars are present.
2017-10-24 11:03:36 -04:00
Jon Dufresne 6ed347d851 Fixed #28706 -- Moved AuthenticationFormn invalid login ValidationError to a method for reuse. 2017-10-23 09:10:45 -04:00
Tomer Chachamu 21a3a29dc9 Fixed #28722 -- Made QuerySet.reverse() affect nulls_first/nulls_last. 2017-10-21 20:55:45 -04:00
Levi Payne 6c3104221b Refs #28721 -- Added test for variations of 'inf'/'infinity' as a template variable names.
Fixed by 9ec7d8e514.
2017-10-21 20:55:26 -04:00
Claude Paroz 9ec7d8e514 Fixed #28730 -- Fixed loss of precision for large integer literals in templates
Thanks Fraser Nevett for the report and Tim Graham for patch edits.
2017-10-21 17:20:29 +02:00
Mads Jensen 45d5d2dcaa Removed unnecessary tuple()/list() calls. 2017-10-21 09:42:25 -04:00
Flávio Juvenal f6e1789654 Fixed #28577 -- Added checks for ArrayField and JSONField to prevent mutable defaults. 2017-10-20 13:17:22 -04:00
Lucas Connors 5ceaf14686 Fixed #27515 -- Made AuthenticationForm's username field use the max_length from the model field.
Thanks Ramin Farajpour Cami for the report.
2017-10-20 11:13:26 -04:00
Lucas Connors d233391208 Refs #19130 -- Added a test for AuthenticationForm.username max_length.
This will be a more useful regression test after refs #27515.
2017-10-20 11:10:32 -04:00
Mads Jensen 5114669f72 Refs #24031 -- Added test for Case and When constructor arguments. 2017-10-20 10:15:11 -04:00
Mads Jensen f7036b3e26 Fixed #28662 -- Silenced join template filter error if arg isn't iterable. 2017-10-20 09:46:31 -04:00
Simon Charette d4fb742094 Refs #28575 -- Made RelatedObjectDoesNotExist classes pickable.
Thanks to Rachel Tobin for the initial __qualname__ work and tests.
2017-10-18 21:43:53 -04:00
Tim Graham 1399f8ae77 Refs #28711 -- Replaced ugettext_lazy() with gettext_lazy() in a test.
As per c651331b34.
2017-10-18 20:07:36 -04:00
Jonas Haag d997ab7764 Fixed #28711 -- Fixed unordered_list template filter with lazy translations. 2017-10-18 19:45:10 -04:00
Jonas Haag b21b1b10af Refs #23260 -- Tested nested generator input to unordered_list template filter. 2017-10-18 19:37:30 -04:00
Tim Graham 1b73ccc4bf Fixed #28497 -- Restored the ability to use sliced QuerySets with __exact.
Regression in ec50937bcb.

Thanks Simon Charette for review.
2017-10-16 13:56:38 -04:00
Yuri Kaszubowski Lopes d98210c255 Fixed #28713 -- Prevented ModelBackend.get_all_permissions() from mutating get_user_permissions(). 2017-10-14 20:47:49 -04:00
Claude Paroz c1fa6672dd Refs #28710 -- Simplified l10n format test 2017-10-14 21:07:51 +02:00
k 399a8db33b Fixed #28695 -- Allowed models to use __init_subclass__(). 2017-10-13 21:29:12 -04:00
Claude Paroz 8c538871bd Fixed #28710 -- Fixed the Basque DATE_FORMAT string
Thanks Eneko Illarramendi for the report and initial patch.
2017-10-13 19:48:20 +02:00
Tom 32ade78c55 Refs #28440 -- Fixed server connection closing test on macOS. 2017-10-13 13:29:29 -04:00
Tim Graham 941b0a5b33 Fixed #28708 -- Added constants to detect the Python version. 2017-10-13 10:11:15 -04:00
Rachel Tobin 6c92f711ea Refs #28575 -- Allowed pickling Model.DoesNotExist and MultipleObjectsReturned classes. 2017-10-13 09:16:09 -04:00
Paulo a7b5ad8b19 Fixed #27846 -- Made Model.refresh_from_db() clear cached relations. 2017-10-12 17:04:10 -04:00
Mads Jensen e8649ae368 Added test for FlatPage.__str__(). 2017-10-12 09:45:49 -04:00
Mads Jensen bd8deeccd5 Added setUp() method to FlatpageModelTests. 2017-10-12 09:45:26 -04:00
François Freitag 41be85862d Fixed #28679 -- Fixed urlencode()'s handling of bytes.
Regression in fee42fd99e.

Thanks Claude Paroz, Jon Dufresne, and Tim Graham for the guidance.
2017-10-12 09:08:33 -04:00
Daniel Tao 4d60261b2a Fixed #28601 -- Prevented cache.get_or_set() from caching None if default is a callable that returns None. 2017-10-10 09:20:34 -04:00
François Freitag 0e212a705e Split django.utils.http tests into separate test classes. 2017-10-10 08:53:01 -04:00
Hasan Ramezani 6aec130a4c Fixed #28591 -- Added an error message for createsuperuser --username= (blank). 2017-10-09 21:49:35 -04:00
Mads Jensen 81d5320db5 Added tests for Combinable's bitwise logical operation errors. 2017-10-09 11:49:19 -04:00
Simon Charette 9d93dff333 Fixed #28665 -- Change some database exceptions to NotImplementedError per PEP 249. 2017-10-06 12:47:08 -04:00
Mariusz Felisiak 1b823b8f18 Fixed #28596 -- Fixed QuerySet.bulk_create() and cascade deletion crash on Oracle when using more than 65535 parameters.
Thanks Tim Graham for the review.
2017-10-05 18:52:37 +02:00
Mads Jensen 86367a11d3 Added tests for invalid {% for %} usage and ForLoop.__repr__(). 2017-10-05 11:33:14 -04:00
Tim Graham d0c761d3f8 Refs #28584 -- Removed unused DatabaseFeatures.can_share_in_memory_db. 2017-10-03 20:17:12 -04:00
Tim Graham 27193aea00 Fixed #28584 -- Dropped support for SQLite < 3.7.15. 2017-10-03 10:42:18 -04:00
Tom f1c007bbf2 Fixed #28642 -- Added caching to parse_accept_lang_header(). 2017-10-02 14:07:28 -04:00
Tom f04e6732c3 Refs #27804 -- Used subTest() in parse_accept_lang_header() test. 2017-10-02 14:04:52 -04:00
Mads Jensen aba3467585 Added tests for invalid {% autoescape %} usage. 2017-10-02 11:02:58 -04:00
Mariusz Felisiak 3fb1ad9505 Fixed incorrect integer division in DeletionTests.test_large_delete_related. 2017-10-02 10:11:20 -04:00
Mariusz Felisiak d896809a3a Refs #23919 -- Removed unneeded float()/int() calls. 2017-10-02 08:49:26 -04:00
Mads Jensen 41406bf98e Increased test coverage for db/backends/base/operations.py. 2017-09-30 19:48:55 -04:00
Mads Jensen 25307089bc Completed test coverage for default template filters. 2017-09-30 18:34:51 -04:00
Tim Graham dd82f33271 Fixed #27979 -- Made MySQL raise IntegrityError rather than OperationalError when saving negative numbers in PositiveInteger fields. 2017-09-29 15:20:32 -04:00
Mads Jensen 3e72f4b7b6 Completed test coverage for BasePasswordHasher. 2017-09-29 09:28:25 -04:00
Mads Jensen 776f6902d9 Moved BasePasswordHasher tests to its own test case. 2017-09-29 09:28:24 -04:00
Mads Jensen d917c17a3b Completed test coverage for AnonymousUser. 2017-09-28 13:11:23 -04:00
Mads Jensen 7fce4dc5ff Moved AnonymousUser tests to its own test case. 2017-09-28 13:11:07 -04:00
Mariusz Felisiak fc6528b25a Fixed #28629 -- Made tree.Node instances hashable.
Regression in 508b5debfb which
added Node.__eq__().
2017-09-28 12:07:19 -04:00
Mads Jensen 129f4900be Added tests for RequestSite.__init__() and __str__(). 2017-09-28 08:16:21 -04:00
Tim Graham 2015f5f134 Added a separate test class for RequestSite. 2017-09-28 08:14:17 -04:00
Tim Graham 1d8cfa3608 Fixed #28626 -- Dropped support for PostgreSQL 9.3.
Thanks Simon Charette for the introspection changes.
2017-09-27 11:00:04 -04:00
Mads Jensen 8ddbe01760 Added a test for pbkdf2()'s default digest algorithm. 2017-09-27 10:36:26 -04:00
Tim Graham c7e9e22695 Added cleanup for an introspection test. 2017-09-27 09:51:49 -04:00
Josh Schneier e8c4596329 Fixed #28562 -- Fixed DecimalValidator handling of positive exponent scientific notation. 2017-09-27 09:42:04 -04:00
Mads Jensen 4803834aaa Added a test for PermWrapper.__iter__(). 2017-09-26 19:42:50 -04:00
Tim Graham cfff2af02b Fixed #27857 -- Dropped support for Python 3.4. 2017-09-25 17:11:03 -04:00
Tim Graham a80903b711 Removed DatabaseFeatures.supports_microsecond_precision.
MySQL 5.5 (refs #28552) was the last database to use it.
2017-09-25 14:48:15 -04:00
Tim Graham 8a1768432b Fixed #28552 -- Dropped support for MySQL 5.5. 2017-09-25 14:48:11 -04:00
Mads Jensen c0d968ea1f Added a test for TranslatableFile.__eq__(). 2017-09-25 10:22:38 -04:00
Tim Graham 67a6ba391b Reverted "Fixed #28248 -- Fixed password reset tokens being valid for 1 day longer than PASSWORD_RESET_TIMEOUT_DAYS."
This reverts commit 95993a89ce.
2017-09-25 09:05:00 -04:00
Tim Graham 4a461d49c7 Advanced deprecation warnings for Django 2.1. 2017-09-22 12:51:19 -04:00
Tim Graham 2bd207ada0 Refs #15667 -- Removed support for Widget.render() methods without the renderer argument.
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham ba42456c2e Refs #27648 -- Removed support for (iLmsu) regex groups in url() patterns.
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham 5bcca2a056 Refs #27532 -- Removed Model._meta.has_auto_field per deprecation timeline. 2017-09-22 12:51:18 -04:00
Tim Graham 48d57788ee Refs #26447 -- Removed the USE_ETAGS setting per deprecation timeline. 2017-09-22 12:51:18 -04:00
Tim Graham 4502489a46 Refs #18974 -- Removed @models.permalink() decorator per deprecation timeline. 2017-09-22 12:51:18 -04:00
Tim Graham 5e31be1b96 Refs #25187 -- Required the authenticate() method of authentication backends to have request as the first positional argument.
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham 578711c310 Refs #27098 -- Removed DatabaseIntrospection.get_indexes() per deprecation timeline. 2017-09-22 12:51:18 -04:00
Tim Graham e62165b898 Refs #27175 -- Removed exception silencing from the {% include %} template tag.
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham 96107e2844 Refs #26956 -- Removed the host parameter of django.utils.http.is_safe_url().
Per deprecation timeline.
2017-09-22 12:51:18 -04:00
Tim Graham e47b56d791 Refs #20892 -- Removed support for passing pylibmc behavior settings as top-level attributes of CACHES['OPTIONS'].
Per deprecation timeline.
2017-09-22 12:51:17 -04:00
Tim Graham 87d2240e6c Refs #27067 -- Removed django.utils.translation.string_concat() per deprecation timeline. 2017-09-22 12:51:17 -04:00
Tim Graham 6e40b70bf4 Refs #26929 -- Removed extra_context parameter of contrib.auth.views.logout_then_login().
Per deprecation timeline.
2017-09-22 12:51:17 -04:00
Tim Graham 4f313e284e Refs #17209 -- Removed login/logout and password reset/change function-based views.
Per deprecation timeline.
2017-09-22 12:51:17 -04:00
Nicolas Delaby 01d440fa1e Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) support.
Thanks Anssi Kääriäinen for contributing to the patch.
2017-09-22 11:53:17 -04:00
Anssi Kääriäinen 771e06af2a Added a test for QuerySet.select_related() reverse caching. 2017-09-21 14:25:42 -04:00
Shai Berger d612026c37 Refs #28595 -- Added a hook to add execute wrappers for database queries.
Thanks Adam Johnson, Carl Meyer, Anssi Kääriäinen, Mariusz Felisiak,
Michael Manfre, and Tim Graham for discussion and review.
2017-09-21 12:13:09 -04:00
Mads Jensen 41a7876991 Added test for too large input to django.utils.http.base36_to_int(). 2017-09-21 10:21:02 -04:00
Niall Dalton 4fe6588da3 Fixed #28576 -- Added color interpretation method to GDALBand. 2017-09-21 09:42:38 -04:00
Thomas Schorr 52eb5b289e Fixed #28617 -- Made ogrinspect output pep8 compliant. 2017-09-20 21:03:14 -04:00
Sjoerd Job Postmus df41b5a05d Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201.
Thanks Aymeric Augustin for shepherding the DEP and patch review.
Thanks Marten Kenbeek and Tim Graham for contributing to the code.
Thanks Tom Christie, Shai Berger, and Tim Graham for the docs.
2017-09-20 18:04:42 -04:00
Florian Apolloner c4c128d67c Fixed #28488 -- Reallowed error handlers to access CSRF tokens.
Regression in eef95ea96f.
2017-09-20 16:22:18 -04:00
Florian Apolloner 77f82c4bf1 Initialized CsrfViewMiddleware once in csrf_tests. 2017-09-20 16:22:12 -04:00
Tim Graham 46dcdf9a29 Added a checks test for valid i18n patterns. 2017-09-20 10:23:28 -04:00
Tim Graham f7b0532ec0 Refs #28334 -- Fixed crash in hstore/citext oid caching during test db creation. 2017-09-19 07:04:31 -04:00
Mariusz Felisiak fb02ebe889 Fixed #28597 -- Fixed crash with the name of a model's autogenerated primary key in an Index's fields. 2017-09-18 14:06:00 -04:00
Johannes Hoppe 94cd8efc50 Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ManyToManyField in the admin.
Thanks Florian Apolloner and Tim Graham for review and
contributing to the patch.
2017-09-18 13:48:02 -04:00
Claude Paroz 774f5548bd Fixed #28610 -- Skipped test when serializer is not available
Thanks Tim Graham for the review.
2017-09-18 18:22:13 +02:00
Mads Jensen d549b88050 Fixed #26608 -- Added support for window expressions (OVER clause).
Thanks Josh Smeaton, Mariusz Felisiak, Sergey Fedoseev, Simon Charettes,
Adam Chainz/Johnson and Tim Graham for comments and reviews and Jamie
Cockburn for initial patch.
2017-09-18 09:42:29 -04:00
Tim Graham da1ba03f1d Added test skipping for a PostgreSQL JSONField test. 2017-09-18 09:19:26 -04:00
Claude Paroz 256182c43d Revert "Refs #21286 -- Enabled serializer tests with time pk model"
This reverts commit 01c6a3e227.
Unfortunately, the YAML serializer is not yet able to cope with time values.
2017-09-18 09:34:21 +02:00
Claude Paroz 01c6a3e227 Refs #21286 -- Enabled serializer tests with time pk model 2017-09-17 19:29:33 +02:00
Igor Gumenyuk 86a18dc46a Fixed #28334 -- Added caching for hstore/citext OIDs. 2017-09-15 10:00:12 -04:00
Mads Jensen 1dafd8cb0b Refs #24031 -- Added test for When.__repr__(). 2017-09-15 06:13:38 -04:00
Tim Graham 116940e3ef Fixed a Dutch translation in i18n tests. 2017-09-14 08:26:38 -04:00
Tim Graham 7cc8507d9c Added a test for mixing args and kwargs in reverse(). 2017-09-14 07:07:41 -04:00
Tim Graham ee4043f735 Refs #28593 -- Moved django.conf.urls.include() to django.urls().
The old location remains for backwards compatibility. Documentation
will be updated separately along with the rest of the URL routing changes.
2017-09-13 16:32:03 -04:00
Mariusz Felisiak c6a1faecc3 Refs #27090 -- Added real database sequence introspection.
Thanks Mariusz Felisiak for the Oracle part and Tim Graham for the
review.
2017-09-13 20:12:32 +02:00
Tom ac756f16c5 Fixed #28440 -- Fixed WSGIServer hang on responses without a Content-Length.
Disabled keep-alive to fix the regression in
e6065c7b83.
2017-09-12 10:41:28 -04:00
Tim Graham f896eb30f6 Removed django.contrib.gis.geometry.backend.
The layer of indirection is unchanged and undocumented
since its introduction in ff60c5f9de.
2017-09-12 09:51:02 -04:00
Josh Schneier 0dbcd0e87f Added tests for DecimalValidator. 2017-09-11 14:18:02 -04:00
Simon Charette c466ef3b34 Tested field deconstruction with DEFAULT_DB_TABLESPACE and db_tablespace. 2017-09-11 12:20:45 -04:00
Sergey Fedoseev 3905cfa1a5 Fixed #28353 -- Fixed some GIS functions when queryset is evaluated more than once.
Reverted test for refs #27603 in favor of using FuncTestMixin.
2017-09-11 11:56:39 -04:00
Sergey Fedoseev a0b4ecce57 Fixed #28392 -- Fixed GIS's WKT regex to match large scientific notation numbers.
Thanks Greg Larmore for report and initial patch.
2017-09-11 09:13:02 -04:00
Claude Paroz a599ae6018 Refs #24928 -- Added introspection support for PostgreSQL RangeField 2017-09-09 20:22:47 +02:00
Claude Paroz 0cbb6ac007 Refs #24928 -- Added introspection support for PostgreSQL JSONField
Thanks Adam Johnson and Tim Graham for the reviews.
2017-09-09 18:26:29 +02:00
Luoxzhg ffbee67f8e Fixed some comments referring to a nonexistent TestClient class. 2017-09-09 11:21:15 -04:00