From 2dcbfadcf637be5ab915e6b591575afc2c79fc4c Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Mon, 5 Feb 2018 13:57:44 +0000 Subject: [PATCH] binary string => byte string --- docs/releases/2.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/releases/2.0.rst b/docs/releases/2.0.rst index b1d92d98c4..193570fa1b 100644 --- a/docs/releases/2.0.rst +++ b/docs/releases/2.0.rst @@ -276,7 +276,7 @@ Please note that the new Draftail rich text editor uses a different mechanism to ``wagtail.images.views.serve.generate_signature`` now returns a string ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``generate_signature`` function in ``wagtail.images.views.serve``, used to build URLs for the :ref:`dynamic image serve view `, now returns a string rather than a binary string. This ensures that any existing user code that builds up the final image URL with ``reverse`` will continue to work on Django 2.0 (which no longer allows binary strings to be passed to ``reverse``). Any code that expects a binary string as the return value of ``generate_string`` - for example, calling ``decode()`` on the result - will need to be updated. (Apps that need to preserve compatibility with earlier versions of Wagtail can call ``django.utils.encoding.force_text`` instead of ``decode``.) +The ``generate_signature`` function in ``wagtail.images.views.serve``, used to build URLs for the :ref:`dynamic image serve view `, now returns a string rather than a byte string. This ensures that any existing user code that builds up the final image URL with ``reverse`` will continue to work on Django 2.0 (which no longer allows binary strings to be passed to ``reverse``). Any code that expects a binary string as the return value of ``generate_string`` - for example, calling ``decode()`` on the result - will need to be updated. (Apps that need to preserve compatibility with earlier versions of Wagtail can call ``django.utils.encoding.force_text`` instead of ``decode``.) Deprecated search view