Commit Graph

14096 Commits

Author SHA1 Message Date
Olexander Yermakov b7fb608142 Fixed #27154 -- Allowed comparing CallableBool with bitwise or.
Thanks Tim for the review.
2016-08-31 08:27:37 -04:00
Claude Paroz fe252c0a5a Fixed #27131 -- Passed proper string type to SMTP connection login
Passing an Unicode string on Python 2 was crashing the connection.
Thanks slavugan@gmail.com for the report, and Tim Graham for the review.
2016-08-31 09:00:41 +02:00
Ryan Allen 190d2ff4a7 Fixed #27153 -- Added validation for HttpResponse status. 2016-08-30 21:59:43 -04:00
Tim Graham 96ee486ea4 Fixed #27081 -- Allowed migrations to serialize methods on pypy. 2016-08-30 21:47:34 -04:00
Kevan Swanberg 35504f74a8 Fixed #26685 -- Added dwithin lookup support on SpatiaLite. 2016-08-30 20:45:47 -04:00
Simon Charette 0d7929266e Fixed #25109 -- Stopped silencing explicitly specified migration modules import errors.
Thanks Tim for the review.
2016-08-30 19:50:42 -04:00
Claude Paroz a72411e140 Removed double semicolon in SQL query 2016-08-30 19:12:55 +02:00
Akshesh 4c7bf83cde Refs #27097, #27098 -- Moved PostgreSQL index type introspection to get_constraints(). 2016-08-30 08:48:55 -04:00
Pavel Sutyrin 3fe92f4477 Clarified topological_sort_as_sets() docstring. 2016-08-29 13:58:39 -04:00
Jon Dufresne ae98d40c35 Fixed #27136 -- Changed auth forms' autofocus attribute to HTML5 boolean syntax. 2016-08-28 17:19:50 -07:00
Baptiste Mispelon 61b45dff6b Fixed #27126 -- Made {% regroup %} return a namedtuple to ease unpacking. 2016-08-26 16:59:21 -04:00
Baptiste Mispelon 47f57d6776 Changed the example in the {% regroup %} docstring. 2016-08-26 16:24:56 -04:00
Chris Jerdonek 42dcceba61 Fixed #26942 -- Added support for subtests during parallel testing. 2016-08-26 14:24:27 -04:00
Berker Peksag a02b5848ae Replaced property() usage with decorator in several places. 2016-08-25 20:06:22 -04:00
Claude Paroz 066283a11d Removed unneeded smart_text 2016-08-25 22:49:31 +02:00
Mattias Loverot 2315114090 Fixed #27067 -- Deprecated string_concat() in favor of format_lazy(). 2016-08-25 16:12:40 -04:00
Claude Paroz 13c3e5d5a0 Fixed #25995 -- Added an encoder option to JSONField
Thanks Berker Peksag and Tim Graham for the reviews.
2016-08-25 21:42:42 +02:00
Tim Graham 4bc6b93994 Fixed #27039 -- Fixed empty data fallback to model field default in model forms. 2016-08-24 17:50:10 -04:00
Berker Peksag 426bca002c Fixed #26816 -- Corrected an admin check to require inlines to subclass InlineModelAdmin. 2016-08-24 17:34:32 -04:00
Berker Peksag 3c97ba2a0d Replaced property() usage with decorator in a couple places. 2016-08-24 17:23:16 -04:00
Tim Graham a3abbe1fcb Removed a blank line per isort. 2016-08-24 13:58:57 -04:00
Berker Peksag 3c18f8a3d2 Fixed #27111 -- Fixed KeyError if USERNAME_FIELD isn't in UserCreationForm.fields. 2016-08-24 13:20:12 -04:00
Mattias Loverot 9aaeec337e Fixed #26866 -- Added format_lazy function
Added format_lazy function to django.utils.text module.
Useful when dealing with relative complex lazy string concatenations
(e.g. in urls.py when translating urls in regular expressions).
2016-08-24 18:18:17 +02:00
Tim Graham 953629b92c Fixed #27072 -- Fixed AddGeometryColumn error when altering a SpatiaLite table. 2016-08-24 08:44:45 -04:00
Simon Charette d5c4ea5246 Fixed #27100 -- Included already applied migration changes in the pre-migrate state.
Refs #24100.

Thanks Tim for the review.
2016-08-24 01:17:48 -04:00
Simon Charette d1757d8df4 Fixed #27044 -- Included already applied migration changes in the post-migrate state when the execution plan is empty.
Refs #24100.

Thanks tkhyn for the report and Tim for the review.
2016-08-24 01:17:18 -04:00
Tim Graham ad25fe7350 Fixed #27089 -- Added database alias to InconsistentMigrationHistory message. 2016-08-23 17:39:58 -04:00
Matthew Somerville fb951fb0c5 Fixed #27103 -- Registered vcapi/rcapi GDAL prototypes based on their own drivers. 2016-08-23 17:30:11 -04:00
Claude Paroz 48c34f3336 Fixed #26971 -- Prevented crash with non-UTF-8 incoming PATH_INFO
Thanks Tim Graham and Loïc Bistuer for the reviews.
2016-08-23 22:40:07 +02:00
Collin Anderson 384f89f8f8 Fixed #26998 -- Reverted some admin checks from checking field.many_to_many back to isinstance(field, models.ManyToManyField).
This partially reverts 983c158da7
2016-08-23 16:00:12 -04:00
Chris Jerdonek a3db480393 Fixed #27061 -- Added a TEST['TEMPLATE'] setting for PostgreSQL. 2016-08-23 15:08:20 -04:00
Helen Sherwood-Taylor bc1e2d8e8e Fixed #27018 -- Fixed admindocs crash with a view in a class.
Generated correct admindocs URLs on Python 3. URLs generate 404s on
Python 2, as in older versions of Django.
2016-08-20 10:01:57 -04:00
Claude Paroz 00bb47b58f Fixed #27096 -- Fixed primary key introspection for sqlite3 backend 2016-08-20 15:57:17 +02:00
Przemysław Suliga 1f68bb5683 Refs #26902 -- Protected against insecure redirects in set_language(). 2016-08-19 19:16:00 -04:00
Przemysław Suliga 549b90fab3 Refs #26902 -- Protected against insecure redirects in Login/LogoutView. 2016-08-19 19:01:01 -04:00
Przemysław Suliga 5e5a17028f Fixed #26902 -- 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
Tim Graham 1d1e246db6 Removed DateTimeAwareJSONEncoder alias. 2016-08-19 15:00:16 -04:00
Matthew Wilkes 4f138fe5a4 Fixed #22288 -- Fixed F() expressions with the __range lookup. 2016-08-19 13:40:56 -04:00
Chris Jerdonek f6cd669ff2 Fixed #22414 -- Ensured that LiveServerTestCase closes connections. 2016-08-19 12:47:41 -04:00
Jon Dufresne f5c6d3c8d9 Fixed #27068 -- Unified form field initial data retrieval. 2016-08-18 17:55:47 -07:00
Ian Foote 39f35d4b9d Fixed #25871 -- Added expressions support to QuerySet.values(). 2016-08-18 16:05:15 -04:00
Loïc Bistuer d4eefc7e2a Fixed #27073 -- Removed duplicated managers in `Model._meta.managers`. 2016-08-19 01:24:45 +07:00
Jim Nicholls 76ab885118 Fixed #27054 -- Fixed makemigrations crash with a read-only database. 2016-08-18 08:27:40 -04:00
Chris Jerdonek 3d0a3c5fff Fixed #27077 -- Made SQLite's in-memory database checks DRYer. 2016-08-17 20:34:18 -04:00
Chris Jerdonek 49fcbe73c5 Fixed #27078 -- Simplified "if" logic in SQLite's _get_test_db_name(). 2016-08-17 16:20:01 -04:00
Andreas Pelme e76981b433 Fixed #26840 -- 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
Akshesh c969b17ad8 Refs #26709 -- Added type check for models.Index fields argument. 2016-08-16 09:53:50 -04:00
Akshesh a71724cd04 Refs #26709 -- Added index name to AddIndex.describe(). 2016-08-16 09:11:33 -04:00
Ian Foote 698be78d74
Fixed #24854 -- Refactored QuerySet._values
Added django.db.models.sql.query.Query.set_values() method to handle
query mutation.
2016-08-16 10:03:40 +10:00
Tim Graham 7549eb0004 Fixed #27009 -- Made update_session_auth_hash() rotate the session key. 2016-08-15 19:29:12 -04:00
Tim Graham 937d752d3d Fixed #27058 -- Reallowed the {% for %} tag to unpack any iterable.
Thanks Sergei Maertens for the report and patch.
2016-08-15 15:39:22 -04:00
Claude Paroz 21aec54296 Removed unnecessary registration of psycopg2 unicode extensions on Python 3 2016-08-15 20:57:57 +02:00
Daniel Wiesmann 89f17e7caf Fixed #27014 -- 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 48ede58971 Fixed #27057 -- Made setup_test_environment() store saved settings in one place. 2016-08-15 13:53:06 -04:00
Curtis Maloney d7e0cf04b7 Used all() and a generator for PermissionsMixin.has_perms(). 2016-08-13 08:46:51 -04:00
Tim Graham ba749f8f87 Refs #13408 -- Removed obsolete code/comments from {% for %} unpacking deprecation. 2016-08-13 08:45:41 -04:00
Chris Jerdonek 5890b1613c Fixed #27008 -- Added --debug-mode option to DiscoverRunner. 2016-08-12 20:43:17 -04:00
Akshesh 6e07ec3f65 Fixed #27030 -- Added contrib.postgres.indexes.GinIndex. 2016-08-12 18:37:03 -04:00
Akshesh 236baa0f0e Refs #27030 -- Added BtreeGinExtension operation. 2016-08-12 18:37:00 -04:00
Akshesh 2f19306a12 Refs #27030 -- Added index type introspection on PostgreSQL. 2016-08-12 16:58:40 -04:00
Michael Schwarz 72d541b61c Fixed #27007 -- 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 #20888 -- Added support for column order in class-based indexes. 2016-08-12 15:52:16 -04:00
Jon Dufresne 6b842c5998 Made BoundField.initial use cached_property.
Follow up to fab46ce6f5.
2016-08-12 12:43:24 -07:00
Jon Dufresne fab46ce6f5 Fixed #27037 -- Prevented required attribute on ClearableFileInput when initial data exists. 2016-08-12 13:59:01 -04:00
Akshesh f842d1011c Refs #20888 -- Added index order introspection. 2016-08-12 11:51:09 -04:00
Stanislav Karpov b387189d86 Fixed #26919 -- Added the action form's media in the changelist view. 2016-08-11 19:35:31 -04:00
Claude Paroz 5fb22b4d4c Fixed #27034 -- Made makemessages independent of USE_I18N
Thanks Tim Graham for the review.
2016-08-11 21:16:19 +02:00
Akshesh 324c1b432a Fixed #24442 -- Improved SchemaEditor's index name truncation. 2016-08-11 14:36:31 -04:00
Ryan P Kilby 7aeb7390fc Fixed #26891 -- Fixed lookup registration for ForeignObject. 2016-08-11 14:16:48 -04:00
Tim Graham ff0a5aff4f Fixed #27046 -- 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 #18682 -- Edited explanation in stale content type deletion.
Follow up to 8db889eaf7.
2016-08-10 21:19:09 -04:00
Ed Morley 7399fee6c3 Refs #26947 -- Added a deployment system check for SECURE_HSTS_PRELOAD. 2016-08-10 20:31:01 -04:00
Ed Morley 3c2447dd13 Fixed #26947 -- Added an option to enable the HSTS header preload directive. 2016-08-10 20:23:54 -04:00
Chris Jerdonek 7f9fd42b93 Fixed #27019 -- Made teardown_test_environment() restore the old DEBUG. 2016-08-10 16:24:41 -04:00
Andrew Nester 4591cf3fd8 Fixed #26909 -- Allowed UserAttributeSimilarityValidator to validate against model properties. 2016-08-10 15:08:06 -04:00
Andrew Nester f5c6295797 Fixed #26844 -- Made formset's validate_min validation ignore empty forms. 2016-08-10 13:03:04 -04:00
Tim Graham 1e32e1cc95 Fixed #26973 -- Fixed views.static.serve() crash with show_indexes enabled. 2016-08-10 11:27:03 -04:00
jordij 0814566bf1 Fixed #26960 -- Added PasswordResetConfirmView option to automatically log in after a reset. 2016-08-10 10:23:16 -04:00
Olexander Yermakov 975a76a964 Fixed #26951 -- Allowed AuthenticationForm to work with a username of 0. 2016-08-10 09:44:48 -04:00
Marcin Nowak 74bb013cc1 Fixed #26905 -- Allowed using MultiValueDict-like objects as form data. 2016-08-09 19:46:24 -04:00
Chris Jerdonek a3a5ef4d0e Fixed #27035 -- Eased changing settings.DEBUG for DiscoverRunner. 2016-08-09 13:40:29 -04:00
Chris Sinchok ac1975b18b Fixed #13809 -- 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
Sergei Maertens 0a5910684a Renamed a camel case variable in the cycle template tag. 2016-08-09 09:42:27 -04:00
Alexander Schrijver 3ae3a1f9fa Fixed #26830 -- Prevented the 'with' templatetag from resetting the cycle variable to its initial state. 2016-08-09 09:05:17 -04:00
Antoine Fontaine 004ba05bca Fixed #27036 -- Made locmem email backend's send_messages() accept generators. 2016-08-08 20:13:29 -04:00
Claude Paroz a6baada7bd Fixed #26940 -- Removed makemessages from no_settings_commands whitelist
As makemessages uses several settings for proper run (FILE_CHARSET,
LOCALE_PATHS, MEDIA_ROOT, and STATIC_ROOT), we should require settings
configuration for this command.
2016-08-08 19:52:57 +02:00
Alex Hill 74105b2636 Fixed #27002 -- Prevented double query when rendering ModelChoiceField. 2016-08-08 13:41:05 -04:00
Adam Zapletal 887f3d3219 Fixed #26764 -- Fixed Session.cycle_key() crash on unaccessed session. 2016-08-08 13:01:25 -04:00
Simon Charette b8e6e1b43b
Fixed #26500 -- 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 #26517 -- Fixed ExpressionWrapper with empty queryset. 2016-08-08 10:43:33 -04:00
Johannes Dollinger 1410616e0e Fixed #26433 -- Fixed Case expressions with empty When. 2016-08-08 10:43:33 -04:00
Chris Jerdonek e7fb724cd2 Fixed #27032 -- Prevented setup_test_environment() from being called twice. 2016-08-08 10:40:29 -04:00
Claude Paroz a7863c78b7 Fixed #27024 -- 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
Adam Zapletal 2a11d2d7a7 Fixed #27028 -- Clarified failed parallel tests message. 2016-08-08 09:24:14 -04:00
Sjoerd Job Postmus 3246d2b4bb Fixed #27026 -- 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 #27027 -- Restored Client.force_login() defaulting to the first auth backend. 2016-08-06 08:41:41 -04:00
Claude Paroz 3569ba0333 Fixed #27015 -- Prevented HTML-invalid minlength/maxlength on hidden inputs 2016-08-06 10:22:17 +02:00
Akshesh 6a8372e6ec Fixed #26808 -- 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 #27004 -- Made migrations consistency check ignore unapplied squashed migrations. 2016-08-05 18:01:55 -04:00
Chris Jerdonek 42f9d65107 Edited docs of test.utils.setup/teardown_test_environment(). 2016-08-05 17:38:49 -04:00
Yoong Kang Lim d30febb4e5 Fixed #26706 -- Made RelatedManager modification methods clear prefetch_related() cache. 2016-08-05 13:32:27 -04:00
Peter Inglesby e139ef5741 Fixed #27023 -- Prevented possibility of shell loading ~/.pythonrc.py twice. 2016-08-05 12:09:45 -04:00
Ville Skyttä a2fb2b3a1f Fixed #27020 -- Used a context manager to close files. 2016-08-04 19:45:14 -04:00
Jon Dufresne 50e299dbfb Fixed #26928 -- Changed forms' checked attribute to HTML5 boolean style. 2016-08-04 19:16:54 -04:00
Chris Jerdonek ebed9ee8d5 Fixed #26981 -- Added DiscoverRunner.get_test_runner_kwargs(). 2016-08-04 14:45:44 -04:00
Tim Graham 967aa7f6cc Fixed #27010 -- Made Argon2PasswordHasher decode with ASCII.
The underlying hasher only generates strings containing ASCII
characters so this is merely a cosmetic change.
2016-08-04 10:57:37 -04:00
Claude Paroz 272eccf7ff Fixed #26983 -- Fixed isnull filtering on ForeignKey with to_field
Thanks weidwonder for the report.
2016-08-04 16:05:21 +02:00
Tim Graham 5c63b3e5a7 Fixed #27005 -- Fixed crash if request.META[''CONTENT_LENGTH']=''. 2016-08-03 13:12:40 -04:00
Alex Hill c5ebfda002 Fixed #27001 -- Fixed a query count regression in ModelChoiceField with RadioSelect. 2016-08-03 10:45:55 -04:00
Sergey Yurchenko 4e64e3bb6e Fixed #26997 -- Fixed checks crash with empty Meta.default_permissions. 2016-08-03 09:14:01 -04:00
Tim Graham ccd5a23fba Fixed #27000 -- Removed BaseCommand.usage() per deprecation timeline (refs #19973). 2016-08-02 18:50:12 -04:00
Akshesh b92c6b7d56 Refs #26709 -- 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
Chris Jerdonek ef92ed530e Fixed #26980 -- Added ParallelTestSuite.runner_class to aid subclassing. 2016-08-02 14:15:06 -04:00
Tim Graham 54afa960d1 Fixed #26988 -- Improved/clarified User.is_authenticated/anonymous compatibility.
Thanks marktranchant for the report and review.
2016-08-02 11:01:08 -04:00
Tim Graham d95c669c29 Fixed #26991 -- Fixed a crash in MySQL where SQL_AUTO_IS_NULL doesn't return a result. 2016-08-02 10:52:31 -04:00
Chris Jerdonek 013ee21cf8 Fixed #26976 -- Added LiveServerTestCase.server_thread_class to ease subclassing. 2016-08-01 16:15:41 -04:00
Adam Chainz 4b1c9708d6 Fixed #26966 -- Made MySQL backend skip defaults for JSON columns
Thanks mcgeeco for reporting, and claudep and timgraham for review.
2016-08-01 13:51:25 -04:00
Claude Paroz 374b6091ac Pulled contrib translations from Transifex
Forward port f19cadd391 from stable/1.10.x
2016-08-01 19:47:19 +02:00
Claude Paroz 07290211ff Pulled core Django translations from Transifex
Forward port 760f076786 from stable/1.10.x
2016-08-01 19:46:47 +02:00
Jon Dufresne ac3aaaa740 Fixed #26927 -- Made subwidget iteration pass disabled and required attributes. 2016-08-01 10:36:17 -04:00
Tim Graham aad46c3e37 Fixed #26930 -- 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
Claude Paroz f530b4fdfc Fixed #26972 -- Fixed is_collection definition in MapWidget initialization 2016-07-31 20:38:29 +02:00
Tim Graham 5fa4370543 Refs #25550 -- Corrected deprecation message for assigning M2M relations. 2016-07-30 20:50:09 -04:00
Tim Graham 4e86168290 Fixed #26970 -- Fixed crash with disabled ModelMultipleChoiceField. 2016-07-30 13:31:48 -04:00
Tomas Pazderka b820b6108a Fixed #26896 -- Allowed a lazy base_url for FileSystemStorage. 2016-07-29 14:13:54 -04:00
Sergey Fedoseev 4178488881 Refs #26657 -- Fixed a crash induced by invalid WKT returned by MySQL 5.7.5+. 2016-07-28 17:48:17 -04:00
Sergey Fedoseev 9031a4c13b Fixed #26657 -- Made GeomValue omit SRID for MySQL.
This fixes some test failures on MySQL 5.7+.
2016-07-28 16:51:47 -04:00
Andrew Nester 0ba179194b Fixed #26929 -- Deprecated extra_context parameter of contrib.auth.views.logout_then_login(). 2016-07-28 11:57:02 -04:00
premanand lakshmanan 5da7e3f7fd Fixed #26114 -- Fixed AlterModelTable.describe() if db_table is None. 2016-07-28 10:33:14 -04:00
Olexander Yermakov 68de48c963 Fixed #26949 -- Fixed crash of disabled forms.JSONField. 2016-07-27 08:14:14 -04:00
Tim Graham a5f85d891b Fixed #26917 -- Fixed crash in disabled ModelChoiceFields.
Partially reverted refs #25532 to fix a regression in Django 1.10.
This reintroduces a crash for disabled forms.JSONField (refs #26949),
however, that issue is also present on Django 1.9.

Thanks Ryan Schave for the test.
2016-07-27 08:14:14 -04:00
Anderson Resende 0d1218896f Fixed #26950 -- Removed obsolete DatabaseOperations SQL methods.
Unused as of 2b039d966f.
2016-07-27 07:34:44 -04:00
Alex Hill 44a6b40280 Fixed #26915 -- Fixed regression handling responses returned from view middleware. 2016-07-25 13:41:50 -04:00
Jon Dufresne 348cfccd90
Fixed #26938 -- Fixed invalid HTML in template postmortem on the debug page. 2016-07-24 18:18:57 +02:00
Alex Hill 971120778a
Fixed #26945 -- Ensured that i18n_patterns returns a list 2016-07-24 17:17:00 +02:00
Andrew Nester dde6288fbe Fixed #26882 -- Added tests for auth.views.logout_then_login(). 2016-07-22 15:04:13 -04:00
Chad Whitman bc1e9e823b Removed duplicate admin CSS selector. 2016-07-21 16:58:14 -04:00
Kevan Swanberg 17a0a6667c Refs #26796 -- Fixed ManyToManyField's limit_choices_to warning without a through model. 2016-07-21 14:29:03 -04:00
Dmitry Dygalo d7a097265b Fixed #26922 -- Fixed SimpleTestCase.assertHTMLEqual() crash on Python 3.5+. 2016-07-21 14:01:23 -04:00
Claude Paroz 283b468462 Fixed #25454 -- 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
Claude Paroz 3ea7167bb5 Refs #24928 -- Added introspection support for UUIDField 2016-07-20 17:27:29 +02:00
Simon Charette 271bfe65d9
Fixed #26916 -- 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 93c538694e Fixed XSS in admin's add/change related popup.
This is a security fix.
2016-07-18 11:17:01 -04:00
akki 767849b765 Removed unnecessary looping in sqlite3 SchemaEditor. 2016-07-18 08:47:30 -04:00
Akshesh bdba0fc195 Fixed typo in autodetector method name. 2016-07-17 15:18:39 -04:00
Claude Paroz 599393172b Fixed #26826 -- 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 #26900 -- Fixed crash accessing deferred FileFields. 2016-07-16 08:22:24 -04:00
Claude Paroz 255fb99284 Fixed #17209 -- Added password reset/change class-based views
Thanks Tim Graham for the review.
2016-07-16 10:36:12 +02:00
andrewnester 20d39325ca Fixed #26765 -- 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 #26889 -- Refactored SchemaEditor to allow backend specific indexes. 2016-07-15 10:34:37 -04:00
Marc-Aurèle Brothier f8bfa80680 Fixed #26868 -- Changed MySQL version detection to use a query.
Workaround a bug with MariaDB and MySQL native client not stripping the
`5.5.5-` prefix.
2016-07-15 10:05:03 -04:00
Claude Paroz 92c48a392f Updated contrib.postgres translation catalog
Forward port of cb78011402 from stable/1.10.x.
2016-07-15 09:48:57 +02:00
Marten Kenbeek 389a5318a0 Fixed #26888 -- 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 #26897 -- 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 #26656 -- Added duration (timedelta) support to DjangoJSONEncoder. 2016-07-14 13:34:15 -04:00
Priy a7b5dfd170 Fixed #26821 -- Fixed forms.Email/URLField crash on None value. 2016-07-14 12:59:14 -04:00
Jensen Cochran d44afd8892 Fixed #26804 -- Fixed a race condition in QuerySet.update_or_create(). 2016-07-14 12:10:19 -04:00
Jon Dufresne 76e19da5b0 Fixed #26890 -- Fixed IntegerField crash on Unicode numbers. 2016-07-14 09:38:57 -04:00
Tim Graham 944e66cb1d Reverted "Fixed #25388 -- 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 #26889 -- Fixed missing PostgreSQL index in SchemaEditor.add_field(). 2016-07-13 14:33:54 -07:00
Kenneth 841cb45847 Fixed #26884 -- Evaluated callables in QuerySet.update_or_create()'s defaults when updating. 2016-07-12 22:09:53 -04:00
Jon Dufresne b84ecaa736 Fixed #26088 -- Made autodector detect changing proxy model to MTI. 2016-07-12 21:45:17 -04:00
Andrey Fedoseev 81963b37a9 Fixed #17657 -- Made ModelForm respect ModelMultipleChoiceField's to_field_name.
Follow up to 67d984413c.
2016-07-12 16:20:06 -04:00
Andrew Nester 08ed3cc6d1 Fixed #26671 -- Made HashedFilesMixin ignore the 'chrome' scheme. 2016-07-12 08:20:39 -04:00
Dmitry S..ky / skype: dvska-at-skype 82be474efa Fixed #26792 -- Allowed None for the value of cache.get_or_set(). 2016-07-11 20:49:27 -04:00
Julien Hartmann f4afb85d7e Fixed #26749 -- Preserved behavior of use_for_related_field during deprecation. 2016-07-11 13:30:44 -04:00
Kenneth 2f587737d7 Fixed #26872 -- Fixed text overflow in ModelAdmin.list_filter. 2016-07-09 08:06:42 -04:00
Loïc Bistuer dab83e5ba1 Fixed #26881 -- 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 #26796 -- Added a system check for m2m fields with ignored limit_choices_to. 2016-07-08 19:37:40 -04:00
Simon Charette 8a4f017f45 Fixed #26348 -- 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 #25774, #26348 -- 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
Simon Charette c4a876a0c1 Refs #17260 -- Prevented Oracle timezone conversion from stripping microseonds. 2016-07-08 12:35:33 -04:00
Claude Paroz 04b7b28812 Fixed #26802 -- 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 #25317, #26090 -- Fixed swapping combinations of unique and db_index during migrations. 2016-07-07 20:29:08 -04:00
Akshesh fc3ac65735 Refs #26709 -- Checked allow_migrate_model() in Add/RemoveIndex operations. 2016-07-07 10:37:39 -04:00
Akshesh 52442898e7 Refs #26709 -- 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 #26833 -- Fixed SchemaEditor._constraint_names() to handle features.uppercases_column_names. 2016-07-07 08:09:42 -04:00
Akshesh f7e907115f Refs #26709 -- Added IndexOperation to avoid code duplication. 2016-07-07 07:35:26 -04:00
Akshesh b1e7d19d4c Refs #26709 -- Required a name for Indexes passed to AddIndex.
Thanks to Markush for discussions.
2016-07-07 07:31:23 -04:00
akki 2960e3a3a7 Fixed #26841 -- Avoid remake tables for altering togethers in sqlite3 (#6888)
alter_index_together and alter_unique_together no more use _remake_table method in sqlite3
2016-07-06 10:03:47 +02:00
Erik Romijn 8db889eaf7 Fixed #18682 -- Expanded explanation in stale content type deletion. (#6869) 2016-07-03 15:55:14 +02:00
Adam Dobrawy 92d323ccb5 Added package names to 'Error loading MySQLdb module' error. 2016-07-01 13:12:27 -04:00
Berker Peksag 12b4280444 Fixed #21548 -- Added FileExtensionValidator and validate_image_file_extension. 2016-06-30 09:08:50 -04:00
Andrew Nester baff4dd37d Fixed #25292 -- Fixed crash in ManyToManyField.through_fields check. 2016-06-30 08:53:38 -04:00
Claude Paroz 490107f14d Added Upper/Lower Sorbian translations 2016-06-29 21:11:30 +02:00
Claude Paroz e8cbf53c33 Added Upper/Lower Sorbian languages 2016-06-29 21:11:30 +02:00
Jon Dufresne 16614dcd5c Fixed #25694 -- Removed incorrect _uniq suffix on index names during migrations. 2016-06-29 14:47:29 -04:00
David Sanders a84344bc53 Fixed #19513, #18580 -- Fixed crash on QuerySet.update() after annotate(). 2016-06-29 14:08:13 -04:00
Lh4cKg 18571aefe6 Added Georgian mapping to contrib/admin/static/admin/js/urlify.js 2016-06-29 09:59:03 -04:00
Christopher Grebs a9e188ccd6 Fixed #26119 -- Fixed URLValidator crash on URLs with brackets. 2016-06-28 15:43:43 -04:00
David Sanders 7ca6007bd2 Fixed #26811 -- Added addButton option to admin inlines JavaScript. 2016-06-28 15:19:53 -04:00
Berker Peksag 52a991d976 Fixed #24694 -- Added support for context_processors to Jinja2 backend. 2016-06-28 14:30:54 -04:00
Eduard Stepanov 49b4596cb4 Fixed #26786 -- Avoided redundant max value validators on integer fields. 2016-06-28 11:39:20 -04:00
Berker Peksag c1b6f554e4 Fixed #15091 -- Allowed passing custom encoder to JSON serializer. 2016-06-28 11:10:07 -04:00
Aaron Elliot Ross 6bf7964023 Fixed #26171 -- Made MySQL create an index on ForeignKeys with db_contraint=False.
Refactored "Prevented unneeded index creation on MySQL-InnoDB" (2ceb10f)
to avoid setting db_index=False.
2016-06-28 08:22:20 -04:00
Shabda Raaj b0acb1e73e Fixed #26779 -- Added extra_context parameter to admin's i18n_javascript view. 2016-06-27 15:37:32 -04:00
Ben Demboski 2224a56631 Fixed #26784 -- Made ForeignKey.validate() pass `model` to router if model_instance=None. 2016-06-27 13:33:37 -04:00
Étienne BERSAC 03f6d272ab Fixed #26751 -- Made dbshell exit with the shell's error code. 2016-06-27 12:20:40 -04:00
Akshesh 156e2d59cf Fixed #26709 -- Added class-based indexes.
Added the AddIndex and RemoveIndex operations to use them in migrations.

Thanks markush, mjtamlyn, timgraham, and charettes for review and advice.
2016-06-27 10:41:01 -04:00
Claude Paroz 9588718cd4 Fixed #5897 -- Added the Content-Length response header in CommonMiddleware
Thanks Tim Graham for the review.
2016-06-27 10:44:57 +02:00
Bang Dao + Tam Huynh 09119dff14 Fixed #26719 -- Normalized email in AbstractUser.clean(). 2016-06-24 10:37:38 -04:00
Tim Graham 7e303d15c3 Refs #12594 -- Removed obsolete exception handling in handle_uncaught_exception().
Since 859fc020a7, this is no longer needed.
2016-06-24 09:27:47 -04:00
Claude Paroz 78963495d0 Refs #17209 -- Added LoginView and LogoutView class-based views
Thanks Tim Graham for the review.
2016-06-24 10:45:13 +02:00
Claude Paroz 742ea51413 Refs #24829 -- Made TemplateResponse.content available sooner in exception context
Thanks Tim Graham for the initial patch.
2016-06-24 10:22:30 +02:00
Tim Graham 81cdcb66bc Fixed #26791 -- Replaced LiveServerTestCase port ranges with binding to port 0. 2016-06-23 12:04:05 -04:00
jasisz b5a1c3a6f5 Fixed #25920 -- Added support for non-uniform NUMBER_GROUPING. 2016-06-22 17:28:49 -04:00
Simon Charette c2e62fd1ae Fixed #26781 -- Made table name case change a noop on SQLite.
SQLite disgresses from the SQL standard by ignoring case of quoted identifiers.

Thanks to laozzzi for the report and Tim for the review.
2016-06-21 16:37:06 -04:00
Tim Graham 39805686b3 Refs #21379, #26719 -- Moved username normalization to AbstractBaseUser.
Thanks Huynh Thanh Tam for the initial patch and Claude Paroz for review.
2016-06-21 16:19:37 -04:00
Sergey Fedoseev 5ce660cd65 Fixed #25940 -- Added OGRGeometry.from_gml() and GEOSGeometry.from_gml(). 2016-06-21 15:46:27 -04:00
Paulo 9c2d5a8d33 Fixed #26729 -- Allowed overriding a form field's label/help_text in Form.__init__() for TabularInline. 2016-06-21 14:26:47 -04:00
Sergey Fedoseev ea4665066b Fixed #26785 -- Made Oracle return None rather than empty string for empty geometries. 2016-06-21 14:06:29 -04:00
Jon Dufresne d13881bd34 Fixed #26783 -- Fixed SessionMiddleware's empty cookie deletion when using SESSION_COOKIE_PATH. 2016-06-21 11:03:25 -04:00
Claude Paroz 140c235026 Fixed #26750 -- Fixed introspection for geography point field with dim=3
Thanks Yegor Kazantsev for the report and the initial patch.
2016-06-21 15:22:21 +02:00
Samir Shah fff5dbe59c Corrected firstof template tag's docstring.
Since Django 1.8, firstof escapes its output.
2016-06-21 08:12:07 -04:00
Tim Graham 4e400dcb79 Refs #22384 -- Readded RegexURLResolver.reverse().
It was removed in 785cc71d5b only because
it was untested and unused in Django itself, however, some third-party
apps use it.
2016-06-20 14:22:27 -04:00
Loïc Bistuer 2eb7cb2fff Fixed #26643 -- Prevented unnecessary AlterModelManagers operations caused by the manager inheritance refactor.
This also makes migrations respect the base_manager_name and
default_manager_name model options.

Thanks Anthony King and Matthew Schinckel for the initial patches.
2016-06-20 12:55:57 -04:00
Tobias McNulty 17e661641d Refs #26666 -- Added ALLOWED_HOSTS validation when running tests.
Also used ALLOWED_HOSTS to check for external hosts in assertRedirects().
2016-06-20 11:07:46 -04:00
Tim Graham 9bf8d50a67 Fixed #26778 -- Fixed ModelSignal.connect() weak argument. 2016-06-18 20:45:38 -04:00
Claude Paroz 8ba44ecda0 Fixed #26775 -- Supported dim=3 geography fields
Thanks François-Xavier Thomas for the report.
2016-06-18 21:48:32 +02:00
Tim Graham cd217de610 Reverted "Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File."
This reverts commit 1b407050dd as it
introduces a regression in the test for refs #26772.
2016-06-18 11:06:56 -04:00
Markus Holtermann 625b8e9295 Fixed #24931 -- Made namespaced RegexURLResolvers populate callback strings.
Fixed a regression in 2f16ff5a6c.

Thanks Tim Graham for the review.
2016-06-18 10:39:32 -04:00
Tim Graham 26d0023ccc Refs #15667 -- Fixed crash when indexing RadioFieldRenderer with ModelChoiceIterator.
Regression in 86573861a9
2016-06-18 10:33:37 -04:00
Claude Paroz f7a363ee1d Fixed #26753 -- Made GDAL a required dependency for contrib.gis
Thanks Tim Graham for the review.
2016-06-18 10:58:02 +02:00
Tim Graham 7def55c3f6 Reverted "Fixed #26398 -- Made FieldFile.open() respect its mode argument."
This reverts commit a52a531a8b due to
regressions described in refs #26772.
2016-06-17 21:04:02 -04:00
Carl Meyer 7d1b69dbe7 Refs #26601 -- Improved backwards-compatibility of DEP 5 middleware exception handling. 2016-06-17 10:00:39 -07:00
Tim Graham 9c3fbf5423 Used SQL from DB backend in GeomValue.
This avoids the deprecated GeomFromText on MySQL (refs #26134).

Thanks Claude Paroz for the review.
2016-06-16 19:51:13 -04:00
Tim Graham ea34426ae7 Fixed flake8 2.6 warnings. 2016-06-16 09:12:50 -04:00
Ville Skyttä 96f97691ad Fixed broken links in docs and comments. 2016-06-15 21:20:23 -04:00
Hugo Osvaldo Barrera 1b407050dd Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File.
914c72be2a introduced a regression that
causes saving a NamedTemporaryFile in a FileField to raise a
SuspiciousFileOperation. To remedy this, if a File has an absolute
path as a filename, use only the basename as the filename.
2016-06-14 09:28:08 -04:00
Sergey Fedoseev cee534228c Refs #25645 -- Removed SpatiaLite 3.x compatibility in gis.db.models.functions.Translate.
Complements 47f22e8286.
2016-06-13 10:32:07 -04:00
Jon Dufresne 267dc4addd Fixed #4136 -- Made ModelForm save empty values for nullable CharFields as NULL.
Previously, empty values were saved as strings.
2016-06-13 09:14:36 -04:00
Charlie Denton f2c0eb19e9 Fixed #26748 -- Allowed overriding JSONField's widget with an attribute. 2016-06-13 08:09:54 -04:00
Vytis Banaitis 57eb17b8c7 Fixed #26746 -- Fixed handling of zero priority in Accept-Language header parsing. 2016-06-13 07:58:25 -04:00
Vytis Banaitis f1b38842af Fixed #26744 -- Fixed a typo in regex for Accept-Language header parsing. 2016-06-11 21:32:56 -04:00
Sergey Fedoseev 6928ad184e Fixed #26736 -- Fixed crashes in SpatialReference with non-ASCII characters. 2016-06-11 21:03:22 -04:00
Jon Dufresne cd88faa628 Removed unnecessary check in TemporaryUploadedFile.
If settings.FILE_UPLOAD_TEMP_DIR is the default value of None,
NamedTemporaryFile will work the same as if nothing was passed.
2016-06-11 20:45:11 -04:00
Dmitry Medvinsky 0451dcc2eb Fixed #26742 -- Fixed action select color in admin changelist. 2016-06-10 11:39:11 -04:00
Berker Peksag 0bce2f102c Fixed #12810 -- Added a check for clashing ManyToManyField.db_table names. 2016-06-10 10:57:22 -04:00
Oliver Sauder 5d8375fe66 Fixed #4548 -- Added username hint to admin's change_password form. 2016-06-09 12:18:15 -04:00
Michal Petrucha 686a593aaa Fixed #26648 -- Added a system check for invalid related_query_name's containing underscores. 2016-06-09 11:57:32 -04:00
Michal Petrucha effb4ed6f5 Replaced a hardcoded LOOKUP_SEP in models/fields/__init__.py 2016-06-09 11:57:00 -04:00
David Sanders 5ec64f96b2 Fixed #26734 -- Made iterator class configurable on ModelChoiceField. 2016-06-09 11:10:26 -04:00
Berker Peksag ae2a7da86b Fixed #20468 -- Added loaddata --exclude option.
Thanks Alex Morozov for the initial patch.
2016-06-09 10:35:32 -04:00
Sergey Fedoseev 21130ce1a9 Fixed #26718 -- Added system check for existence of the fields specified by ForeignKey.to_field. 2016-06-09 10:19:09 -04:00
krishbharadwaj f6681393d3 Fixing #26524 -- Made a foreign key id reference in ModelAdmin.list_display display the id. 2016-06-08 17:20:03 -04:00
Thejaswi Puthraya c8d2120b06 Fixed #26705 -- Fixed plural versions of languages not supported by Django. 2016-06-08 16:17:17 -04:00
Emad Mokhtar c4980e28e5 Fixed #26290 -- Warned that paginating an unordered QuerySet may result in inconsistent results. 2016-06-08 14:09:24 -04:00