Django 1.7.1 版本发行说明
Django 1.7.1 fixes several bugs in 1.7.
- Allowed related many-to-many fields to be referenced in the admin (#23604).
- Added a more helpful error message if you try to migrate an app without first creating the table ().
- Modified migrations dependency algorithm to avoid possible infinite recursion.
- Fixed a
UnicodeDecodeError
when theflush
error message contained Unicode characters (#22882). - Reinstated missing
CHECK
SQL clauses which were omitted on some backends when not using migrations (). - Fixed serialization of
type
objects in migrations (#22951). - Allowed inline and hidden references to admin fields ().
- The
@deconstructible
decorator now fails with aValueError
if the decorated object cannot automatically be imported (#23418). - Fixed a typo in an
inlineformset_factory()
error message that caused a crash (). - Restored the ability to use ABSOLUTE_URL_OVERRIDES with the
'auth.User'
model (). As a side effect, the setting now adds aget_absolute_url()
method to any model that appears inABSOLUTE_URL_OVERRIDES
but doesn’t defineget_absolute_url()
. - Avoided masking some
ImportError
exceptions during application loading (#22920). - Empty
index_together
orunique_together
model options no longer results in infinite migrations (). - Allowed migrations to work with
app_label
s that have the same last part (e.g.django.contrib.auth
andvendor.auth
) (#23483). - Restored the ability to deepcopy
F
objects (). - Formats for Welsh (
cy
) and several Chinese locales (zh_CN
,zh_Hans
,zh_Hant
andzh_TW
) have been added. Formats for Macedonian have been fixed (trailing dot removed, #23532). - Added quoting of constraint names in the SQL generated by migrations to prevent crash with uppercase characters in the name ().
- Fixed renaming of models with a self-referential many-to-many field (
ManyToManyField('self')
) (#23503). - Added the , get_max_num(), and hooks to GenericInlineModelAdmin ().
- Made
migrations.RunSQL
no longer require percent sign escaping. This is now consistent with (#23426). - Made the entry in the TEST dictionary usable ().
- Fixed bug in migrations that prevented foreign key constraints to unmanaged models with a custom primary key (#23415).
- Added
SchemaEditor
for MySQL GIS backend so that spatial indexes will be created for apps with migrations (). - Added
SchemaEditor
for Oracle GIS backend so that spatial metadata and indexes will be created for apps with migrations (#23537). - Coerced the
related_name
model field option to Unicode during migration generation to generate migrations that work with both Python 2 and 3 (). - Fixed
MigrationWriter
to handle builtin types without imports (#23560). - Made the view to browse view details check if the view specified in the URL exists in the URLconf. Previously it was possible to import arbitrary packages from the Python path. This was not considered a security issue because
admindocs
is only accessible to staff users (#23601). - Fixed
UnicodeDecodeError
crash inAdminEmailHandler
with non-ASCII characters in the request (). - Fixed missing
get_or_create
andupdate_or_create
on related managers causingIntegrityError
(#23611). - Made return the proper type (bytestring) on Python 3 (#23333).
- can now serialize timezone-aware values (#23365).
- Added a prompt to the migrations questioner when removing the null constraint from a field to prevent an IntegrityError on existing NULL rows ().
- Fixed generic relations in
ModelAdmin.list_filter
(#23616). - Restored RFC compliance for the SMTP backend on Python 3 ().
- Fixed a crash while parsing cookies containing invalid content (#23638).
- The system check framework now raises error models.E020 when the class method
Model.check()
is unreachable (). - Made the Oracle test database creation drop the test user in the event of an unclean exit of a previous test run (#23649).
- Fixed to detect changes to Meta.db_table ().
- Fixed a regression when feeding the Django test client with an empty data string (#21740).