Django 1.7.2 release notes
- Fixed migration’s renaming of auto-created many-to-many tables when changing (#23630).
- Fixed a migration crash when adding an explicit
id
field to a model on SQLite (). - Added a warning for duplicate models when a module is reloaded. Previously a
RuntimeError
was raised every time two models clashed in the app registry. (#23621). - Prevented from loading initial data for migrated apps (#23699).
- Fixed a regression in 1.7.1 when
STATIC_ROOT
has the defaultNone
value (). - Added GeoDjango compatibility with mysqlclient database driver.
- Fixed MySQL 5.6+ crash with
GeometryField
s in migrations (#23719). - Fixed a migration crash when removing a field that is referenced in
AlterIndexTogether
orAlterUniqueTogether
(). - Updated the first day of the week in the Ukrainian locale to Monday.
- Added support for transactional spatial metadata initialization on SpatiaLite 4.1+ (#23152).
- Fixed a migration crash that prevented changing a nullable field with a default to non-nullable with the same default ().
- Fixed a migration crash when adding
GeometryField
s withblank=True
on PostGIS (#23731). - Allowed usage of
DateTimeField()
asTransform.output_field
(). - Fixed a migration serializing bug involving
float("nan")
andfloat("inf")
(#23770). - Fixed a regression where custom form fields having a
queryset
attribute but nolimit_choices_to
could not be used in a (#23795). - Fixed a custom field type validation error with MySQL backend when
db_type
returnedNone
(). - Fixed a migration crash when a field is renamed that is part of an
index_together
(#23859). - Fixed to respect the
--no-optimize
parameter (#23799). - Avoided unnecessary rollbacks of migrations from other apps when migrating backwards ().
- Fixed a rare query error when using deeply nested subqueries (#23605).
- Fixed a crash in migrations when deleting a field that is part of a constraint ().
- Fixed
django.core.files.File.__repr__()
when the file’sname
contains Unicode characters (#23888). - Added missing context to the admin’s
delete_selected
view that prevented custom site header, etc. from appearing (). - Fixed a regression with dynamically generated inlines and allowed field references in the admin (#23754).
- Fixed an infinite loop bug for certain cyclic migration dependencies, and made the error message for cyclic dependencies much more helpful.
- Added missing
index_together
handling for SQLite (). - Fixed a crash when
RunSQL
SQL content was collected by the schema editor, typically when usingsqlmigrate
(#23909). - Fixed a regression in
contrib.admin
add/change views which caused someModelAdmin
methods to receive the incorrectobj
value (). - Fixed
runserver
crash when socket error message contained Unicode characters (#23946). - Fixed serialization of
type
when adding adeconstruct()
method (). - Prevented the
django.contrib.auth.middleware.SessionAuthenticationMiddleware
from setting a"Vary: Cookie"
header on all responses (#23939). - Fixed a crash when adding
blank=True
toTextField()
on MySQL (). - Fixed index creation by the migration infrastructure, particularly when dealing with PostgreSQL specific
{text|varchar}_pattern_ops
indexes (#23954). - Fixed bug in
makemigrations
that created broken migration files when dealing with multiple table inheritance and inheriting from more than one model (). - Fixed a crash when a
MultiValueField
has invalid data (#23674). - Fixed a crash in the admin when using “Save as new” and also deleting a related inline ().
- Always converted
related_name
to text (Unicode), since that is required on Python 3 for interpolation. Removed conversion ofrelated_name
to text in migration deconstruction (#23455 and ). - Fixed
timesince
filter translations in Korean (#23989). - Fixed the SQLite
SchemaEditor
to properly add defaults in the absence of a user specifieddefault
. For example, aCharField
with didn’t set existing rows to an empty string which resulted in a crash when adding theNOT NULL
constraint (). makemigrations
no longer prompts for a default value when addingTextField()
orCharField()
without adefault
(#23405).- Fixed a migration crash when adding
order_with_respect_to
to a table with existing rows (). - Restored the
pre_migrate
signal if all apps have migrations (#23975). - Made admin system checks run for custom
AdminSite
s (). - Ensured the app registry is fully populated when unpickling models. When an external script (like a queueing infrastructure) reloads pickled models, it could crash with an
AppRegistryNotReady
exception (#24007). - Added quoting to field indexes in the SQL generated by migrations to prevent a crash when the index name requires it ().
- Added
datetime.time
support to migrations questioner (#23998). - Fixed admindocs crash on apps installed as eggs ().
- Changed migrations autodetector to generate an
AlterModelOptions
operation instead ofDeleteModel
andCreateModel
operations when changingMeta.managed
. This prevents data loss when changingmanaged
fromFalse
toTrue
and vice versa (#24037). - Enabled the
sqlsequencereset
command on apps with migrations (). - Added tablespace SQL to apps with migrations (#24051).
- Corrected
contrib.sites
default site creation in a multiple database setup (). - Restored support for objects that aren’t
str
or indjango.utils.safestring.mark_for_escaping()
on Python 3. - Supported strings escaped by third-party libraries with the
__html__
convention in the template engine (#23831). - Prevented extraneous
DROP DEFAULT
SQL in migrations (). - Restored the ability to use more than five levels of subqueries (#23758).
- Fixed crash when
ValidationError
is initialized with a that is initialized with a dictionary ().