Commit Graph

9299 Commits

Author SHA1 Message Date
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
Sergey Fedoseev 63d2472b10 Fixed capitalization of "Spherical Mercator." 2017-09-09 09:35:30 -04:00
Sergey Fedoseev 0ab1dc0a8b Fixed deepcopy of AreaField and DistanceField. 2017-09-08 14:13:50 -04:00
Tim Graham 0c4ac12a7b Fixed #28546 -- Fixed translation's to_locale() with langauge subtags.
Thanks Brent Hand for the initial patch.
2017-09-08 13:46:00 -04:00
Tim Graham 9829b75d5b Added more tests for translation's to_locale(). 2017-09-08 13:43:06 -04:00
Tim Graham 6e4c6281db Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."
This reverts commit 550cb3a365
because try/except performs better.
2017-09-07 08:16:21 -04:00
Sergey Fedoseev f3c9562143 Fixed #15648 -- Allowed QuerySet.values_list() to return a namedtuple. 2017-09-06 15:32:32 -04:00
Olivier Tabone a027447f56 Fixed #27318 -- Made cache.set_many() return the list of failed keys. 2017-09-06 14:38:44 -04:00
Sami J. Lehtinen 407c1249c9 Fixed #28032 -- Added Paginator.get_page().
Moved boilerplate from docs to a method.
2017-09-06 14:17:19 -04:00
Sergey Fedoseev 5b1c389603 Refs #23919 -- Replaced usage of django.utils.functional.curry() with functools.partial()/partialmethod(). 2017-09-06 13:11:18 -04:00
François Freitag ad4a8acdb5 Fixed #11557 -- Added support for a list of fields in Meta.get_latest_by and QuerySet.earliest()/latest(). 2017-09-05 20:14:54 -04:00
Dima Kudosh 093fd479d6 Fixed #28335 -- Allowed query expressions in Meta.ordering. 2017-09-05 19:10:20 -04:00
Josh Schneier 48c394a6fc Fixed #28555 -- Made CharField convert whitespace-only values to the empty_value when strip is enabled. 2017-09-05 12:41:38 -04:00
Tim Graham 46e2b9e059 Fixed CVE-2017-12794 -- Fixed XSS possibility in traceback section of technical 500 debug page.
This is a security fix.
2017-09-05 10:58:38 -04:00
François Freitag 663946463d Removed hardcoding from get_earliest_or_latest tests' tearDown(). 2017-09-05 10:04:22 -04:00
Mariusz Felisiak 3ba4de59a2 Added tests for BooleanField/NullBooleanField's check constraints on Oracle. 2017-09-05 09:02:56 +02:00
Mads Jensen f4135783ad Fixed #28126 -- Added GistIndex to contrib.postgres.
Thanks to Marc Tamlyn for the initial patch.
2017-09-04 21:08:02 -04:00
Nick Pope 66657eb01f Improved messages in IndexErrors raised by GDAL objects. 2017-09-04 19:00:32 -04:00
Nick Pope 0d9e1163e8 Fixed #28569 -- Corrected get_layer_by_name prototype to skip error checking.
All other get_*_by_name functions have errcheck=False. This makes it
return None for an invalid name instead of raising a GDALException.
2017-09-04 18:56:23 -04:00
Jeremy Satterfield 0891503fad Fixed #28493 -- Made migrations autodetector find dependencies for model renaming. 2017-09-04 15:15:39 -04:00
Sebastian Sassi 5848305218 Fixed #28082 -- Made BaseDateListView pass context from get_dated_items() to subclasses.
Thanks leon-matthews for the report and fix.
2017-09-04 10:55:18 -04:00
Srinivas Reddy Thatiparthy 0d3f567a7a Corrected YearComparisonLookup.get_bound() signature. 2017-09-04 10:17:51 -04:00
Igor Tokarev af35c69a3c Fixed #26344 -- Made EmailMessage include alternatives when the body is empty and it has attachments. 2017-09-04 08:46:11 -04:00
Nick Pope dea4cfb95b Refs #27804 -- Used subTest() in a modeladmin test. 2017-09-03 21:20:43 -04:00
Nick Pope 9397d3add4 Fixed #28558 -- Simplified code to remove OGRIndexError.
The test is a regression for refs #4740 to show that the original fix of
OGRIndexError is no longer needed.

This is similar to the removal of GEOSIndexError in
197b187810.
2017-09-03 21:19:37 -04:00
Mads Jensen feb1a0a692 Refs #27804 -- Used subTest() in a syndication test. 2017-09-03 20:40:50 -04:00
caleb logan 68f0e8d8b1 Fixed #28500 -- Fixed crash in FileBasedCache._is_expired() if the cache file is empty. 2017-09-03 20:11:49 -04:00
ZachLiuGIS 2dacc2ccd9 Fixed #28550 -- Restored contrib.auth's login() and logout() views' respect of positional arguments.
Regression in 78963495d0.

Forwardport of f8e0557b01 from stable/1.11.x
2017-09-03 12:06:44 -04:00
Nick Pope 35800acf79 Refs #25225 -- Removed test for removed ListMixin._IndexError.
Unused since 197b187810.
2017-09-03 10:44:52 -04:00
LBerrocal 54f7aa04a7 Fixed #28306 -- Completed test coverage for django.utils.lorem_ipsum.
Thanks Idan Melamed for the original patch.
2017-09-02 15:50:43 -04:00
François Freitag 18dd9ba481 Fixed test in auth_tests modifying data from setUpTestData(). 2017-09-01 21:43:41 -04:00
Jeremy Kerr 84b7cb7df0 Fixed #28549 -- Fixed QuerySet.defer() with super and subclass fields.
Previously, deferring fields in different classes didn't omit the
superclass' deferred field.

Thanks Simon Charette for the suggested fix.
2017-08-31 09:35:05 -04:00
Tim Graham e5bd585c6e Fixed #28543 -- Prevented ManyToManyField.value_from_object() from being lazy.
Previously, it was a QuerySet which could reevaluate to a new value if the
model's data changes. This is inconsistent with other Field.value_from_object()
methods.

This allows reverting the fix in the admin for refs #27998.
2017-08-31 09:34:44 -04:00
Nick Pope ec6481246a Fixed #28524 -- Fixed program name in management commands when using 'python -m django'. 2017-08-31 09:22:25 -04:00
caleb logan 9e2bf65d6a Fixed #28530 -- Prevented SelectDateWidget from localizing years in output. 2017-08-29 14:56:08 -04:00
Collin Anderson 751f7a6d9b Added Media.__repr__().
It makes it easier to debug MediaOrderConflictWarnings
(refs #28377).
2017-08-26 20:57:45 -04:00
Claude Paroz 4b67e8dc75 Complemented datetime picker selenium test
This includes test coverage for the calendarMonth JS function in calendar.js
2017-08-26 18:00:44 +02:00
Mads Jensen e016c4c65b Refs #27869 -- Omitted field kwargs from GinIndex.deconstruct() if they're None. 2017-08-26 10:32:03 -04:00
Mads Jensen fb42d02471 Refs #25809 -- Omitted pages_per_range from BrinIndex.deconstruct() if it's None. 2017-08-26 09:45:45 -04:00
Sergey Fedoseev 1a85b07bdd Fixed #28518 -- Improved performance of loading geometries from DB. 2017-08-24 14:08:35 -04:00
hui shang c0f4c60edd Fixed #28513 -- Added POST request support to LogoutView. 2017-08-24 09:11:16 -04:00
Fabian Schindler da0fb5b1ec Fixed #28380 -- Excluded null geometries in SpatiaLite geometry lookups. 2017-08-24 08:30:11 -04:00
Claude Paroz 09b3e46635 Fixed #27796 -- Prevented middleware being loaded twice with runserver
Thanks Tim Graham for the review.
2017-08-23 23:05:18 +02:00
Kevin Grinberg c6a3546093 Fixed #28451 -- Restored pre-Django 1.11 Oracle sequence/trigger naming.
Regression in 69b7d4b116.
2017-08-22 15:51:08 -04:00
Claude Paroz ed77bea582 Refs #28502 -- Complemented stringformat tuple handling/test.
An additional test and a code change were suggested in a late review.
2017-08-22 08:45:08 -04:00
Simon Meers 7bba82453c Fixed #28496 -- Added ModelAdmin.get_changelist_instance(). 2017-08-22 08:17:26 -04:00
Paulo fea9cb46aa Fixed #28375 -- Fixed KeyError crash on reverse prefetch of a model with OneToOneField primary key to a non-pk field. 2017-08-21 16:14:13 -04:00
Srinivas Reddy Thatiparthy 4ead705cb3 Fixed #28502 -- Made stringformat template filter accept tuples 2017-08-21 09:04:43 +02:00
Srinivas Reddy Thatiparthy a64f88f5be Refs #28502 -- Completed stringformat filter tests 2017-08-19 21:22:59 +02:00
Mariusz Felisiak 6784383e93 Fixed #28498 -- Fixed test database creation with cx_Oracle 6. 2017-08-16 18:39:58 +02:00
Claude Paroz 546412e673 Fixed #28495 -- Converted GDAL Feature.fields to strings 2017-08-15 19:31:22 +02:00
Martin von Gagern 71d39571f4 Fixed #28485 -- Made ExceptionReporter.get_traceback_frames() include frames without source code. 2017-08-12 20:32:39 -04:00
Alejandro Zamora 90d7b912b9 Fixed #28201 -- Added ProhibitNullCharactersValidator and used it on CharField form field. 2017-08-12 20:14:14 -04:00
Tom b78d100fa6 Fixed #27849 -- Added filtering support to aggregates. 2017-08-12 17:58:28 -04:00
Mariusz Felisiak 489421b015 Fixed #23546 -- Added kwargs support for CursorWrapper.callproc() on Oracle.
Thanks Shai Berger, Tim Graham and Aymeric Augustin for reviews and
Renbi Yu for the initial patch.
2017-08-12 21:06:49 +02:00
Tim Graham d04b324969 Fixed #28421 -- Split some long FormSet tests and made other cosmetic cleanups.
Thanks Windson for the initial patch.
2017-08-11 17:43:50 -04:00
Sergey Fedoseev 5cc7462067 Refs #28459 -- Optimized ModelState instantiation. 2017-08-11 15:41:04 -04:00
Nerl~ 97cb3bd16d Fixed #28456 -- Allowed customizing Model pickling by overriding __getstate__(). 2017-08-11 15:27:25 -04:00
Evan Grim 7937cc16f5 Fixed #28386 -- Made operations within non-atomic migrations honor the operation's atomic flag when migrating backwards. 2017-08-10 19:21:14 -04:00
Evan Grim 5893eaddf4 Added missing test for RunPython behavior when unapplying. 2017-08-10 19:19:48 -04:00
Sergey Fedoseev c3c6c92d76 Refs #18247 -- Fixed filtering on CombinedExpression(output_field=DecimalField()) annotation on SQLite. 2017-08-10 17:42:30 -04:00
Paulo bfb746f983 Refs #16043 -- Refactored internal fields value cache.
* Removed all hardcoded logic for _{fieldname}_cache.
* Added an internal API for interacting with the field values cache.

Thanks carljm and MarkusH for support.
2017-08-10 12:06:02 -04:00
Mariusz Felisiak 3189a93ceb Refs #23766 -- Added tests for CursorWrapper.callproc().
Thanks Tim Graham for the review.
2017-08-08 22:13:02 +02:00
Sergey Fedoseev c754bdc45b Refs #7070 -- Improved test for extra(), values(), distinct() and ordering() all together.
Tested that the extra select that appears in the select clause only because of
distinct() and order_by() doesn't appear in the result values.
2017-08-08 14:38:43 -04:00
Claude Paroz 831358f23d Fixed #28465 -- Unified index SQL creation in DatabaseSchemaEditor
Thanks Tim Graham for the review.
2017-08-08 17:37:43 +02:00
Timothy Allen 5fe9b7b40a Fixed #28457 -- Updated the design of the 'Congrats' page for new Django projects.
Developed by Timothy Allen and Chad Whitman of The Wharton School with
shepherding from Aymeric Augustin and Collin Anderson.
2017-08-07 10:33:55 -04:00
Tim Graham d70432deae Refs #7697 -- Tested escaping of safe strings in the technical 500 debug view.
Tests were omitted in the original commit: a56a226241.
2017-08-02 15:56:47 -04:00
Tim Graham 293608a2e0 Refs #7697 -- Removed unnecessary force_escape of technical 500 debug view "unicode hint".
The test passes before and after the removal. unicode_hint will never
be SafeText, so normal autoescaping is sufficient.
2017-08-02 15:16:22 -04:00
Tim Graham 74b7a20fe6 Refs #5046 -- Tested the 'unicode hint' in the technical 500 debug view. 2017-08-02 15:07:26 -04:00
Tim Graham 78c155cf2e Fixed #28441 -- Fixed GEOS version parsing with a commit hash at the end. 2017-08-02 09:30:30 -04:00
Sergey Fedoseev 58da81a5a3 Fixed #27985 -- Fixed query for __exact=value when get_prep_value() converts value to None.
Also fixed crash of .filter(field__transform=None).
2017-07-31 15:34:07 -04:00
Sergey Fedoseev 0baea920c8 Fixed #28453 -- Made __exact=None lookup use transforms. 2017-07-31 13:31:04 -04:00
Tim Graham e3bd328b0f Removed a primary key value dependency in a multiple_database test.
Follow up to a51c4de194.
2017-07-31 13:28:29 -04:00
Sergey Fedoseev aadd3aeb2b Avoided creating temporary lists for obtaining the first item. 2017-07-31 11:02:23 -04:00
Mads Jensen a51c4de194 Used assertRaisesMessage() to test Django's error messages. 2017-07-29 19:07:23 -04:00
Srinivas Reddy Thatiparthy b306c0c1a3 Fixed #28264 -- Made FilePathField sort files and directories when recursive=True. 2017-07-29 09:15:46 -04:00
Mariusz Felisiak b61d5b1991 Fixed #28371 -- Fixed Cast() with CharField if the max_length argument isn't provided.
Thanks Tim Graham for the review.
2017-07-27 19:36:47 +02:00
Sergey Fedoseev 6ebe3a95ea Fixed #28437 -- Added support for complex geometry expressions in GIS lookups. 2017-07-27 08:06:08 -04:00
Anton Samarchyan c91dcd36fc Improved test coverage for django.conf. 2017-07-26 20:00:28 -04:00
Anton Samarchyan 0eefda493b Improved test coverage for django.contrib.sitemaps. 2017-07-26 15:01:46 -04:00
Melvyn Sopacua 5bb9b9a388 Fixed #28363 -- Allowed naming the migration generated by squashmigrations. 2017-07-26 13:47:35 -04:00
Sergey Fedoseev 5ccbcc5bf6 Fixed #28433 -- Made GEOSGeometry.__eq__() work correctly with non-canonical EWKT string. 2017-07-26 09:42:02 -04:00
Sergey Fedoseev f3bada9889 Fixed #28436 -- Added support for distance lookups on MySQL. 2017-07-26 08:50:56 -04:00
Sergey Fedoseev 38af496b98 Fixed #28432 -- Allowed geometry expressions to be used with distance lookups.
Distance lookups use the Distance function for decreased code redundancy.
2017-07-25 15:49:35 -04:00
Sergey Fedoseev d17eaa868c Removed obsolete references to add_to_query().
Support for it was removed in d3f00bd570.
2017-07-25 07:52:05 -04:00
Windson yang f32d24652b Fixed #28321 -- Prevented FormSet.full_clean() from adding errors from deleted forms. 2017-07-24 18:55:41 -04:00
Mariusz Felisiak 28a02259cb Fixed DatabaseFeatures.has_case_insensitive_like on MySQL and Oracle.
Incorrect since its introduction in 20bab2cf9d.
2017-07-24 21:51:29 +02:00
Rachel Tobin f9e5f9ae9f Fixed #28418 -- Fixed queryset crash when using a GenericRelation to a proxy model. 2017-07-21 18:21:13 -04:00
Tom Carrick 3159ad4df6 Fixed #27970 -- Allowed QuerySet.in_bulk() to fetch on fields besides primary key. 2017-07-21 08:34:35 -04:00
Simon Charette 160969d970 Refs #24887 -- Stopped mutating a test expression during as_sql().
Also defined an explicit output_field as it was mixing an expression with an
IntegerField() with one with a DecimalField().
2017-07-21 00:23:01 -04:00
Tim Graham 487362fa8f Fixed #28370 -- Deprecated the context arg of Field.from_db_value() and Expression.convert_value().
Unused since a0d166306f.
2017-07-20 16:30:08 -04:00
Johannes Hoppe c19b56f633 Fixed #28377 -- Made combining form Media retain relative asset order.
Thanks Florian Apolloner, Mariusz Felisiak, and Tim Graham for reviews.
2017-07-20 11:06:30 -04:00
Sergey Fedoseev 3b56f2191d Simplified handling of GIS lookup params. 2017-07-20 10:08:55 -04:00
Sergey Fedoseev 9415fcfef6 Tested the case when the lhs of a raster lookup has an index specified and the rhs doesn't. 2017-07-20 09:05:45 -04:00
Sergey Fedoseev 37fbeb99f9 Removed unused models.DecimalField._format().
Unused since b3b71a0922.
2017-07-20 09:00:18 -04:00
Roman Selivanov d4da39685b Fixed #28414 -- Fixed ClearableFileInput rendering as a subwidget of MultiWidget. 2017-07-19 14:28:06 -04:00
Sergey Fedoseev 3f7953846e Fixed typo in DistanceLookupBase.process_rhs() error message. 2017-07-19 13:40:56 -04:00
Sergey Fedoseev dc738a0c76 Removed redundant lookup values in RasterFieldTest.test_all_gis_lookups_with_rasters.
These values produce already tested lookups and prevent another one from
being tested.
2017-07-18 15:01:09 -04:00
Sergey Fedoseev 12812f6b2d Fixed RasterFieldTest.test_all_gis_lookups_with_rasters.
It was inadvertently made a no-op in
378cf689d8.
2017-07-18 08:47:59 -04:00
Srinivas Reddy Thatiparthy 71ff9a74cb Created a dedicated test directory for FilePathField tests. 2017-07-17 16:40:34 -04:00
Mariusz Felisiak 776cee9749 Fixed #28391 -- Fixed Cast() with CharField and max_length on MySQL.
Thanks Tim Graham for the review.
2017-07-17 21:12:27 +02:00
Florian Apolloner adab280cef Fixed #28399 -- Fixed QuerySet.count() for union(), difference(), and intersection() queries. 2017-07-15 08:20:12 -04:00