Commit Graph

8179 Commits

Author SHA1 Message Date
Przemysław Suliga 5e5a17028f Fixed -- Allowed is_safe_url() to require an https URL.
Thanks Andrew Nester, Berker Peksag, and Tim Graham for reviews.
2016-08-19 18:51:33 -04:00
Matthew Wilkes 4f138fe5a4 Fixed -- Fixed F() expressions with the __range lookup. 2016-08-19 13:40:56 -04:00
Chris Jerdonek f6cd669ff2 Fixed -- Ensured that LiveServerTestCase closes connections. 2016-08-19 12:47:41 -04:00
Jon Dufresne f5c6d3c8d9 Fixed -- Unified form field initial data retrieval. 2016-08-18 17:55:47 -07:00
Tim Graham 13857b45ca Removed unused 'password' parameter in auth_tests. 2016-08-18 19:01:28 -04:00
Ian Foote 39f35d4b9d Fixed -- Added expressions support to QuerySet.values(). 2016-08-18 16:05:15 -04:00
Loïc Bistuer d4eefc7e2a Fixed -- Removed duplicated managers in `Model._meta.managers`. 2016-08-19 01:24:45 +07:00
Jim Nicholls 76ab885118 Fixed -- Fixed makemigrations crash with a read-only database. 2016-08-18 08:27:40 -04:00
Chris Lamb 97513269d7 Refs -- Added test for isnull lookup to CharField with primary_key=True. 2016-08-17 21:08:15 -04:00
Andreas Pelme e76981b433 Fixed -- Added test.utils.setup/teardown_databases(). 2016-08-17 13:55:04 -04:00
Adam Chainz 19e20a2a3f Fixed crash comparing CheckMessage objects to non-CheckMessage objects. 2016-08-16 17:17:34 -04:00
Adam Chainz 68b580323b Added tests for check Message equality. 2016-08-16 17:04:13 -04:00
Tim Graham 5a41ca79dc Replaced 'raise SkipTest' with self.skipTest() in a few tests. 2016-08-16 16:42:27 -04:00
Adam Chainz 4f5b7eeb53 Fixed reverse accessor check failures in indexes tests. 2016-08-16 16:10:59 -04:00
Tim Graham 02c276623d Moved model_validation tests to invalid_models_tests. 2016-08-16 15:22:58 -04:00
Akshesh c969b17ad8 Refs -- Added type check for models.Index fields argument. 2016-08-16 09:53:50 -04:00
Akshesh a71724cd04 Refs -- Added index name to AddIndex.describe(). 2016-08-16 09:11:33 -04:00
Tim Graham 7549eb0004 Fixed -- Made update_session_auth_hash() rotate the session key. 2016-08-15 19:29:12 -04:00
Tim Graham 937d752d3d Fixed -- Reallowed the {% for %} tag to unpack any iterable.
Thanks Sergei Maertens for the report and patch.
2016-08-15 15:39:22 -04:00
Daniel Wiesmann 89f17e7caf Fixed -- Fixed annotations with database functions on PostGIS.
Thanks Sean Mc Allister for providing a test.
2016-08-15 14:23:10 -04:00
Chris Jerdonek 5890b1613c Fixed -- Added --debug-mode option to DiscoverRunner. 2016-08-12 20:43:17 -04:00
Akshesh 6e07ec3f65 Fixed -- Added contrib.postgres.indexes.GinIndex. 2016-08-12 18:37:03 -04:00
Akshesh 236baa0f0e Refs -- Added BtreeGinExtension operation. 2016-08-12 18:37:00 -04:00
Akshesh 2f19306a12 Refs -- Added index type introspection on PostgreSQL. 2016-08-12 16:58:40 -04:00
Michael Schwarz 72d541b61c Fixed -- Handled non-UTF-8 bytes objects for text/* attachments.
The fallback logic which allows non-UTF-8 encoded files to be passed to
attach_file() even when a `text/*` mime type has been specified is
moved to attach(). Both functions now fall back to a content type of
`application/octet-stream`.

A side effect is that a file's content is decoded in memory instead of
opening it in text mode and reading it into a string.

Some mimetype-related logic in _create_attachment() has become
obsolete as the code moved from attach_file() to attach() already
handles this.
2016-08-12 16:35:09 -04:00
Akshesh 311a8e8d50 Fixed -- Added support for column order in class-based indexes. 2016-08-12 15:52:16 -04:00
Jon Dufresne fab46ce6f5 Fixed -- Prevented required attribute on ClearableFileInput when initial data exists. 2016-08-12 13:59:01 -04:00
Akshesh f842d1011c Refs -- Added index order introspection. 2016-08-12 11:51:09 -04:00
Stanislav Karpov b387189d86 Fixed -- Added the action form's media in the changelist view. 2016-08-11 19:35:31 -04:00
Claude Paroz 5fb22b4d4c Fixed -- Made makemessages independent of USE_I18N
Thanks Tim Graham for the review.
2016-08-11 21:16:19 +02:00
Akshesh 324c1b432a Fixed -- Improved SchemaEditor's index name truncation. 2016-08-11 14:36:31 -04:00
Ryan P Kilby 7aeb7390fc Fixed -- Fixed lookup registration for ForeignObject. 2016-08-11 14:16:48 -04:00
Tim Graham ff0a5aff4f Fixed -- Supported IPv6-formatted IPv4 addresses in host validation.
Thanks LaMont Jones for the report and patch.
2016-08-11 13:54:39 -04:00
Tim Graham e2dfa81ff7 Refs -- Edited explanation in stale content type deletion.
Follow up to 8db889eaf7.
2016-08-10 21:19:09 -04:00
Ed Morley 7399fee6c3 Refs -- Added a deployment system check for SECURE_HSTS_PRELOAD. 2016-08-10 20:31:01 -04:00
Ed Morley 3c2447dd13 Fixed -- Added an option to enable the HSTS header preload directive. 2016-08-10 20:23:54 -04:00
Adam Chainz a757c68129 Fixed admin_views clashing field check error.
admin_views.Recommendation.recommender: (models.E006) The field 'recommender'
clashes with the field 'recommender' from model 'admin_views.title'.
2016-08-10 15:54:29 -04:00
Tim Graham 176f27049e Updated an import per isort. 2016-08-10 15:27:31 -04:00
Andrew Nester 4591cf3fd8 Fixed -- Allowed UserAttributeSimilarityValidator to validate against model properties. 2016-08-10 15:08:06 -04:00
Andrew Nester f5c6295797 Fixed -- Made formset's validate_min validation ignore empty forms. 2016-08-10 13:03:04 -04:00
Tim Graham 1e32e1cc95 Fixed -- Fixed views.static.serve() crash with show_indexes enabled. 2016-08-10 11:27:03 -04:00
jordij 0814566bf1 Fixed -- Added PasswordResetConfirmView option to automatically log in after a reset. 2016-08-10 10:23:16 -04:00
Olexander Yermakov 975a76a964 Fixed -- Allowed AuthenticationForm to work with a username of 0. 2016-08-10 09:44:48 -04:00
Marcin Nowak 74bb013cc1 Fixed -- Allowed using MultiValueDict-like objects as form data. 2016-08-09 19:46:24 -04:00
Tim Graham a7a7ecd2b0 Refs -- Fixed a couple timezone tests for Python 3.6.
Reflects behavior changes in PEP 495 (Local Time Disambiguation).
2016-08-09 18:14:15 -04:00
Chris Jerdonek a3a5ef4d0e Fixed -- Eased changing settings.DEBUG for DiscoverRunner. 2016-08-09 13:40:29 -04:00
Chris Sinchok ac1975b18b Fixed -- Made FieldFile.open() respect its mode argument. 2016-08-09 12:53:18 -04:00
Claude Paroz ade681b9ad Unified SpatiaLite spelling 2016-08-09 18:46:28 +02:00
Alexander Schrijver 3ae3a1f9fa Fixed -- Prevented the 'with' templatetag from resetting the cycle variable to its initial state. 2016-08-09 09:05:17 -04:00
Alexander Schrijver 31e053edfa Refs -- Added a test for a named cycle template tag inside an ifchanged block and a for loop. 2016-08-09 08:47:09 -04:00
Ed Morley 8c3bc5cd78 Fixed docs to refer to HSTS includeSubdomains as a directive.
The spec refers to it as a 'directive' rather than a 'tag':
https://tools.ietf.org/html/rfc6797#section-6.1.2
2016-08-08 20:20:49 -04:00
Antoine Fontaine 004ba05bca Fixed -- Made locmem email backend's send_messages() accept generators. 2016-08-08 20:13:29 -04:00
Tim Graham 35225e2ade Refs -- Fixed a servers test on Python 3.6.
After https://hg.python.org/cpython/rev/4ea79767ff75/,
test_strips_underscore_headers fails with:
'Stub' object has no attribute 'sendall'.
2016-08-08 16:50:48 -04:00
Alex Hill 74105b2636 Fixed -- Prevented double query when rendering ModelChoiceField. 2016-08-08 13:41:05 -04:00
Simon Charette 29a3f8b4bb
Refs -- Corrected a test for missing select_for_update(nowait=True) support. 2016-08-08 13:03:19 -04:00
Adam Zapletal 887f3d3219 Fixed -- Fixed Session.cycle_key() crash on unaccessed session. 2016-08-08 13:01:25 -04:00
Simon Charette b8e6e1b43b
Fixed -- Added SKIP LOCKED support to select_for_update().
Thanks Tim for the review.
2016-08-08 12:01:43 -04:00
Johannes Dollinger 46509cf13d Moved EmpytResultSet to django.core.exceptions.
This removes the need for some inner imports.
2016-08-08 10:43:34 -04:00
Johannes Dollinger c002a0d39f Fixed -- Fixed ExpressionWrapper with empty queryset. 2016-08-08 10:43:33 -04:00
Johannes Dollinger 1410616e0e Fixed -- Fixed Case expressions with empty When. 2016-08-08 10:43:33 -04:00
Chris Jerdonek e7fb724cd2 Fixed -- Prevented setup_test_environment() from being called twice. 2016-08-08 10:40:29 -04:00
Claude Paroz a7863c78b7 Fixed -- Prevented logging error with empty string as geometry widget value
Thanks Gavin Wahl for the report, and Tim Graham for the review.
2016-08-08 16:28:19 +02:00
Michael Schwarz 6fe391d437 Refs -- Enhanced mail text attachment test
The test now also checks whether the sent message's attachment has the expected
name, content and mime type.
2016-08-07 19:18:08 +02:00
Sjoerd Job Postmus 3246d2b4bb Fixed -- Fixed state initialization of bulk_create() objects if can_return_ids_from_bulk_insert. 2016-08-06 10:24:57 -04:00
Ben Demboski fc8f097117 Fixed -- Restored Client.force_login() defaulting to the first auth backend. 2016-08-06 08:41:41 -04:00
Claude Paroz 3569ba0333 Fixed -- Prevented HTML-invalid minlength/maxlength on hidden inputs 2016-08-06 10:22:17 +02:00
Akshesh 6a8372e6ec Fixed -- Added Meta.indexes for class-based indexes.
* Added the index name to its deconstruction.
* Added indexes to sqlite3.schema._remake_table() so that indexes
  aren't dropped when _remake_table() is called.

Thanks timgraham & MarkusH for review and advice.
2016-08-05 18:12:51 -04:00
Jarek Glowacki d117567c7d Fixed -- Made migrations consistency check ignore unapplied squashed migrations. 2016-08-05 18:01:55 -04:00
Simon Charette cdf54db6c5 Used CaptureQueriesContext in select_for_update tests. 2016-08-05 17:00:11 -04:00
Yoong Kang Lim d30febb4e5 Fixed -- Made RelatedManager modification methods clear prefetch_related() cache. 2016-08-05 13:32:27 -04:00
Ville Skyttä a2fb2b3a1f Fixed -- Used a context manager to close files. 2016-08-04 19:45:14 -04:00
Jon Dufresne 50e299dbfb Fixed -- Changed forms' checked attribute to HTML5 boolean style. 2016-08-04 19:16:54 -04:00
Chris Jerdonek ebed9ee8d5 Fixed -- Added DiscoverRunner.get_test_runner_kwargs(). 2016-08-04 14:45:44 -04:00
Claude Paroz 272eccf7ff Fixed -- Fixed isnull filtering on ForeignKey with to_field
Thanks weidwonder for the report.
2016-08-04 16:05:21 +02:00
Chris Jerdonek 7bc5274f6f Fixed -- Removed unnecessary setup_test_environment() in a test. 2016-08-04 09:35:44 -04:00
Tim Graham 5c63b3e5a7 Fixed -- Fixed crash if request.META[''CONTENT_LENGTH']=''. 2016-08-03 13:12:40 -04:00
Tim Graham 4a696bbe13 Fixed a GeoIP test failure with the latest data. 2016-08-03 11:08:30 -04:00
Alex Hill c5ebfda002 Fixed -- Fixed a query count regression in ModelChoiceField with RadioSelect. 2016-08-03 10:45:55 -04:00
Sergey Yurchenko 4e64e3bb6e Fixed -- Fixed checks crash with empty Meta.default_permissions. 2016-08-03 09:14:01 -04:00
Akshesh b92c6b7d56 Refs -- Replaced Index.get_name() with set_name_with_model().
This removes the dependency of the Index class on its 'model'
attribute.
2016-08-02 14:21:41 -04:00
Tim Graham 54afa960d1 Fixed -- Improved/clarified User.is_authenticated/anonymous compatibility.
Thanks marktranchant for the report and review.
2016-08-02 11:01:08 -04:00
Tim Graham 24123c3136 Fixed admin_utils test failures due to translation updates. 2016-08-01 15:40:46 -04:00
Jon Dufresne ac3aaaa740 Fixed -- Made subwidget iteration pass disabled and required attributes. 2016-08-01 10:36:17 -04:00
Tim Graham aad46c3e37 Fixed -- Prevented makemigrations from accessing an empty database.
Thanks Liz Lemon for the report and investigation and
Claude Paroz for the test.
2016-08-01 07:57:12 -04:00
Tim Graham 5fa4370543 Refs -- Corrected deprecation message for assigning M2M relations. 2016-07-30 20:50:09 -04:00
Tim Graham 4e86168290 Fixed -- Fixed crash with disabled ModelMultipleChoiceField. 2016-07-30 13:31:48 -04:00
Tomas Pazderka b820b6108a Fixed -- Allowed a lazy base_url for FileSystemStorage. 2016-07-29 14:13:54 -04:00
Tim Graham 0850236a8c Fixed a typo in tests/middleware/test_security.py 2016-07-28 22:00:48 -04:00
Jensen Cochran 83be40760a Fixed -- Fixed flaky update_or_create() test from refs . 2016-07-28 21:45:35 -04:00
Sergey Fedoseev 4178488881 Refs -- Fixed a crash induced by invalid WKT returned by MySQL 5.7.5+. 2016-07-28 17:48:17 -04:00
Andrew Nester 0ba179194b Fixed -- Deprecated extra_context parameter of contrib.auth.views.logout_then_login(). 2016-07-28 11:57:02 -04:00
Tim Graham 412b4126d7 Removed a blank line per isort and a trailing whitespace. 2016-07-28 11:56:25 -04:00
premanand lakshmanan 5da7e3f7fd Fixed -- Fixed AlterModelTable.describe() if db_table is None. 2016-07-28 10:33:14 -04:00
Olexander Yermakov 68de48c963 Fixed -- Fixed crash of disabled forms.JSONField. 2016-07-27 08:14:14 -04:00
Tim Graham a5f85d891b Fixed -- Fixed crash in disabled ModelChoiceFields.
Partially reverted refs  to fix a regression in Django 1.10.
This reintroduces a crash for disabled forms.JSONField (refs ),
however, that issue is also present on Django 1.9.

Thanks Ryan Schave for the test.
2016-07-27 08:14:14 -04:00
Alex Hill 44a6b40280 Fixed -- Fixed regression handling responses returned from view middleware. 2016-07-25 13:41:50 -04:00
Jon Dufresne 348cfccd90
Fixed -- Fixed invalid HTML in template postmortem on the debug page. 2016-07-24 18:18:57 +02:00
Alex Hill 971120778a
Fixed -- Ensured that i18n_patterns returns a list 2016-07-24 17:17:00 +02:00
Andrew Nester dde6288fbe Fixed -- Added tests for auth.views.logout_then_login(). 2016-07-22 15:04:13 -04:00
Jon Dufresne caa006f327 Removed unnecessary coerce to list in forms_tests. 2016-07-22 07:46:45 -04:00
Kevan Swanberg 17a0a6667c Refs -- Fixed ManyToManyField's limit_choices_to warning without a through model. 2016-07-21 14:29:03 -04:00
Dmitry Dygalo d7a097265b Fixed -- Fixed SimpleTestCase.assertHTMLEqual() crash on Python 3.5+. 2016-07-21 14:01:23 -04:00
Tobias McNulty 915786785f Fixed -- Fixed i18n test failure on Mac OS X. 2016-07-21 13:54:35 -04:00
Raphaël Hertzog 8e5cbc884f Fixed -- Fixed template_tests with numpy < 1.9.0. 2016-07-21 12:59:55 -04:00
Claude Paroz 283b468462 Fixed -- Ensured register_hstore_handler is called for all connections
Thanks Simon Charette for help with the patch.
2016-07-21 17:54:54 +02:00
Dmitry Dygalo ca32979cdc
Made miscellaneous code cleanups 2016-07-21 10:08:19 -04:00
Claude Paroz 3ea7167bb5 Refs -- Added introspection support for UUIDField 2016-07-20 17:27:29 +02:00
Simon Charette 271bfe65d9
Fixed -- Fixed prefetch_related when using a cached_property as to_attr.
Thanks Trac alias karyon for the report and Tim for the review.
2016-07-19 16:05:07 -04:00
Tim Graham 081fdaf110 Fixed a GeoIP test failure with the latest data. 2016-07-19 09:08:46 -04:00
Tim Graham 93c538694e Fixed XSS in admin's add/change related popup.
This is a security fix.
2016-07-18 11:17:01 -04:00
Claude Paroz 599393172b Fixed -- Stripped spaces from dumpdata pks arguments
Thanks Kevin Graham Foster for the report and Tim Graham for the review.
2016-07-16 20:49:10 +02:00
Tim Graham 7c33aa8a87 Fixed -- Fixed crash accessing deferred FileFields. 2016-07-16 08:22:24 -04:00
Claude Paroz 255fb99284 Fixed -- Added password reset/change class-based views
Thanks Tim Graham for the review.
2016-07-16 10:36:12 +02:00
andrewnester 20d39325ca Fixed -- Made CommonMiddleware no longer set an ETag when response has Cache-Control: no-store. 2016-07-15 15:34:00 -04:00
Jon Dufresne 3f76d1402d Refs -- Refactored SchemaEditor to allow backend specific indexes. 2016-07-15 10:34:37 -04:00
Marten Kenbeek 389a5318a0 Fixed -- Fixed concurrency issue in URL resolver.
Fixed a regression in 625b8e9295d79650208bfb3fca8bf9e6aaf578e4:
improper short-circuiting could lead to a KeyError when threads
concurrently call RegexURLResolver._populate().
2016-07-14 14:41:52 -04:00
Claude Paroz 3e71f6544f Fixed -- Fixed makemessages crash on Python 2 with non-ASCII file names
Thanks Tim Graham for the review.
2016-07-14 20:37:56 +02:00
Will Hardy 8ef78b8165 Fixed -- Added duration (timedelta) support to DjangoJSONEncoder. 2016-07-14 13:34:15 -04:00
Priy a7b5dfd170 Fixed -- Fixed forms.Email/URLField crash on None value. 2016-07-14 12:59:14 -04:00
Jensen Cochran d44afd8892 Fixed -- Fixed a race condition in QuerySet.update_or_create(). 2016-07-14 12:10:19 -04:00
Jon Dufresne 76e19da5b0 Fixed -- Fixed IntegerField crash on Unicode numbers. 2016-07-14 09:38:57 -04:00
Tim Graham 944e66cb1d Reverted "Fixed -- Added an option to allow disabling of migrations during test database creation"
This reverts commit 157d7f1f1d since it
disables migrations all the time, not just during tests.
2016-07-14 09:21:28 -04:00
Jon Dufresne 2e4cfcd2b9 Fixed -- Fixed missing PostgreSQL index in SchemaEditor.add_field(). 2016-07-13 14:33:54 -07:00
Kenneth 841cb45847 Fixed -- Evaluated callables in QuerySet.update_or_create()'s defaults when updating. 2016-07-12 22:09:53 -04:00
Jon Dufresne b84ecaa736 Fixed -- Made autodector detect changing proxy model to MTI. 2016-07-12 21:45:17 -04:00
Andrey Fedoseev 81963b37a9 Fixed -- Made ModelForm respect ModelMultipleChoiceField's to_field_name.
Follow up to 67d984413c.
2016-07-12 16:20:06 -04:00
Andrew Nester 08ed3cc6d1 Fixed -- Made HashedFilesMixin ignore the 'chrome' scheme. 2016-07-12 08:20:39 -04:00
Dmitry S..ky / skype: dvska-at-skype 82be474efa Fixed -- Allowed None for the value of cache.get_or_set(). 2016-07-11 20:49:27 -04:00
Julien Hartmann f4afb85d7e Fixed -- Preserved behavior of use_for_related_field during deprecation. 2016-07-11 13:30:44 -04:00
Baptiste Mispelon 418658f453 Fixed numpy deprecation warning silencing in template_tests. 2016-07-09 10:23:58 -04:00
Kenneth 2f587737d7 Fixed -- Fixed text overflow in ModelAdmin.list_filter. 2016-07-09 08:06:42 -04:00
Loïc Bistuer dab83e5ba1 Fixed -- Fixed duplicate managers in migrations.
When both parent and child models had managers with the same name and
a migrations opt-in both were added to the migration state.
2016-07-09 17:52:52 +07:00
Anderson Resende ba53da894f Fixed -- Added a system check for m2m fields with ignored limit_choices_to. 2016-07-08 19:37:40 -04:00
Simon Charette 8a4f017f45 Fixed -- Added TruncTime and exposed it through the __time lookup.
Thanks Tim for the review.
2016-07-08 12:35:34 -04:00
Simon Charette 082c52dbed Refs , -- Allowed Trunc functions to operate with time fields.
Thanks Josh for the amazing testing setup and Tim for the review.
2016-07-08 12:35:34 -04:00
Jon Dufresne e9e705eedc Added strict=True to all SchemaEditor.alter_field() calls in tests.
It should help catch bugs.
2016-07-08 12:03:33 -04:00
Claude Paroz 04b7b28812 Fixed -- Prevented crash when attaching bytes as text message
Thanks Tim Graham for the review.
2016-07-08 11:58:05 +02:00
Jon Dufresne 9356f63a99 Fixed , -- Fixed swapping combinations of unique and db_index during migrations. 2016-07-07 20:29:08 -04:00
Akshesh fc3ac65735 Refs -- Checked allow_migrate_model() in Add/RemoveIndex operations. 2016-07-07 10:37:39 -04:00
Akshesh 52442898e7 Refs -- Added 'model' argument to SchemaEditor.add/remove_index()
This removes the dependency of the Index class on its model attribute
when a name is passed to it.

Thanks to Markush for discussions.
2016-07-07 10:06:55 -04:00
Jon Dufresne 3410820460 Fixed -- Fixed SchemaEditor._constraint_names() to handle features.uppercases_column_names. 2016-07-07 08:09:42 -04:00
Akshesh b1e7d19d4c Refs -- Required a name for Indexes passed to AddIndex.
Thanks to Markush for discussions.
2016-07-07 07:31:23 -04:00
Tim Graham a81fe17b3e Promoted RemovedInDjango21Warning to error in Django's test suite. 2016-07-06 14:34:33 -04:00
Erik Romijn 8db889eaf7 Fixed -- Expanded explanation in stale content type deletion. () 2016-07-03 15:55:14 +02:00
Akshesh f7e00b40c5
Refs -- Avoided clashing keyword arguments in test_autodetector
Factor method signatures in test_autodetector to avoid clashing keyword
arguments when introducing indexes.
2016-07-03 09:01:07 +02:00
Baptiste Mispelon a9215b7c36 Refs -- Skipped tests that rely on pillow when it's not installed 2016-07-02 15:46:16 +02:00
Tim Graham 5f8da22984 Fixed a urlpatterns_reverse test on Python 2 non-ASCII path. 2016-07-01 09:09:31 -04:00
Berker Peksag 12b4280444 Fixed -- Added FileExtensionValidator and validate_image_file_extension. 2016-06-30 09:08:50 -04:00
Andrew Nester baff4dd37d Fixed -- Fixed crash in ManyToManyField.through_fields check. 2016-06-30 08:53:38 -04:00
Jon Dufresne 16614dcd5c Fixed -- Removed incorrect _uniq suffix on index names during migrations. 2016-06-29 14:47:29 -04:00