Django 1.11.1 release notes

May 6, 2017

Django 1.11.1 adds a minor feature and fixes several bugs in 1.11.

Allowed disabling server-side cursors on PostgreSQL

The change in Django 1.11 to make QuerySet.iterator() use server-side cursors on PostgreSQL prevents running Django with PgBouncer in transaction pooling mode. To reallow that, use the DISABLE_SERVER_SIDE_CURSORS setting in DATABASES.

See Transaction pooling and server-side cursors for more discussion.

Bugfixes

  • Made migrations respect Index’s name argument. If you created a named index with Django 1.11, makemigrations will create a migration to recreate the index with the correct name (#%s28051).
  • Fixed a crash when using a __icontains lookup on a ArrayField (#%s28038).
  • Fixed a crash when using a two-tuple in EmailMessage’s attachments argument (#%s28042).
  • Fixed QuerySet.filter() crash when it references the name of a OneToOneField primary key (#%s28047).
  • Fixed empty POST data table appearing instead of “No POST data” in HTML debug page (#%s28079).
  • Restored BoundFields without any choices evaluating to True (#%s28058).
  • Prevented SessionBase.cycle_key() from losing session data if _session_cache isn’t populated (#%s28066).
  • Fixed layout of ReadOnlyPasswordHashWidget (used in the admin’s user change page) (#%s28097).
  • Allowed prefetch calls on managers with custom ModelIterable subclasses (#%s28096).
  • Fixed change password link in the contrib.auth admin for el, es_MX, and pt translations (#%s28100).
  • Restored the output of the class attribute in the <ul> of widgets that use the multiple_input.html template. This fixes ModelAdmin.radio_fields with admin.HORIZONTAL (#%s28059).
  • Fixed crash in BaseGeometryWidget.subwidgets() (#%s28039).
  • Fixed exception reraising in ORM query execution when cursor.execute() fails and the subsequent cursor.close() also fails (#%s28091).
  • Fixed a regression where CheckboxSelectMultiple, NullBooleanSelect, RadioSelect, SelectMultiple, and Select localized option values (#%s28075).
  • Corrected the stack level of unordered queryset pagination warnings (#%s28109).
  • Fixed a regression causing incorrect queries for __in subquery lookups when models use ForeignKey.to_field (#%s28101).
  • Fixed crash when overriding the template of django.views.static.directory_index() (#%s28122).
  • Fixed a regression in formset min_num validation with unchanged forms that have initial data (#%s28130).
  • Prepared for cx_Oracle 6.0 support (#%s28138).
  • Updated the contrib.postgres SplitArrayWidget to use template-based widget rendering (#%s28040).
  • Fixed crash in BaseGeometryWidget.get_context() when overriding existing attrs (#%s28105).
  • Prevented AddIndex and RemoveIndex from mutating model state (#%s28043).
  • Prevented migrations from dropping database indexes from Meta.indexes when changing Field.db_index to False (#%s28052).
  • Fixed a regression in choice ordering in form fields with grouped and non-grouped options (#%s28157).
  • Fixed crash in BaseInlineFormSet._construct_form() when using save_as_new (#%s28159).
  • Fixed a regression where Model._state.db wasn’t set correctly on multi-table inheritance parent models after saving a child model (#%s28166).
  • Corrected the return type of ArrayField(CITextField()) values retrieved from the database (#%s28161).
  • Fixed QuerySet.prefetch_related() crash when fetching relations in nested Prefetch objects (#%s27554).
  • Prevented hiding GDAL errors if it’s not installed when using contrib.gis (#%s28160). (It’s a required dependency as of Django 1.11.)
  • Fixed a regression causing __in lookups on a foreign key to fail when using the foreign key’s parent model as the lookup value (#%s28175).