Django 1.11.1 版本发行说明
漏洞修复
- Made migrations respect ’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 (). - Fixed a crash when using a
__icontains
lookup on aArrayField
(#28038). - Fixed a crash when using a two-tuple in
EmailMessage
’sattachments
argument (). - Fixed
QuerySet.filter()
crash when it references the name of aOneToOneField
primary key (#28047). - Fixed empty POST data table appearing instead of “No POST data” in HTML debug page ().
- Restored
BoundField
s without anychoices
evaluating toTrue
(#28058). - Prevented
SessionBase.cycle_key()
from losing session data if_session_cache
isn’t populated (). - Fixed layout of
ReadOnlyPasswordHashWidget
(used in the admin’s user change page) (#28097). - Fixed change password link in the
contrib.auth
admin forel
, , andpt
translations (). - Restored the output of the
class
attribute in the<ul>
of widgets that use themultiple_input.html
template. This fixesModelAdmin.radio_fields
withadmin.HORIZONTAL
(#28059). - Fixed crash in
BaseGeometryWidget.subwidgets()
(). - Fixed exception reraising in ORM query execution when
cursor.execute()
fails and the subsequentcursor.close()
also fails (#28091). - Fixed a regression where
CheckboxSelectMultiple
,NullBooleanSelect
,RadioSelect
,SelectMultiple
, andSelect
localized option values (). - Corrected the stack level of unordered queryset pagination warnings (#28109).
- Fixed a regression causing incorrect queries for
__in
subquery lookups when models useForeignKey.to_field
(). - Fixed crash when overriding the template of
django.views.static.directory_index()
(#28122). - Fixed a regression in formset validation with unchanged forms that have initial data ().
- Prepared for
cx_Oracle
6.0 support (#28138). - Fixed crash in
BaseGeometryWidget.get_context()
when overriding existingattrs
(). - Prevented
AddIndex
andRemoveIndex
from mutating model state (#28043). - Prevented migrations from dropping database indexes from
Meta.indexes
when changingField.db_index
toFalse
(). - Fixed a regression in choice ordering in form fields with grouped and non-grouped options (#28157).
- Fixed crash in
BaseInlineFormSet._construct_form()
when usingsave_as_new
(). - Fixed a regression where
Model._state.db
wasn’t set correctly on multi-table inheritance parent models after saving a child model (#28166). - Corrected the return type of
ArrayField(CITextField())
values retrieved from the database (). - Fixed
QuerySet.prefetch_related()
crash when fetching relations in nestedPrefetch
objects (#27554). - Prevented hiding GDAL errors if it’s not installed when using
contrib.gis
(). (It’s a required dependency as of Django 1.11.) - Fixed a regression causing lookups on a foreign key to fail when using the foreign key’s parent model as the lookup value (#28175).