Django 1.7.2 release notes¶
January 2, 2015
Django 1.7.2 fixes several bugs in 1.7.1.
Additionally, Django’s vendored version of six, django.utils.six, has
been upgraded to the latest release (1.9.0).
Bugfixes¶
- Fixed migration’s renaming of auto-created many-to-many tables when changing
Meta.db_table(#23630). - Fixed a migration crash when adding an explicit
idfield to a model on SQLite (#23702). - Added a warning for duplicate models when a module is reloaded. Previously a
RuntimeErrorwas raised every time two models clashed in the app registry. (#23621). - Prevented
flushfrom loading initial data for migrated apps (#23699). - Fixed a
makemessagesregression in 1.7.1 whenSTATIC_ROOThas the defaultNonevalue (#23717). - Added GeoDjango compatibility with mysqlclient database driver.
- Fixed MySQL 5.6+ crash with
GeometryFields in migrations (#23719). - Fixed a migration crash when removing a field that is referenced in
AlterIndexTogetherorAlterUniqueTogether(#23614). - 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 (#23738).
- Fixed a migration crash when adding
GeometryFields withblank=Trueon PostGIS (#23731). - Allowed usage of
DateTimeField()asTransform.output_field(#23420). - Fixed a migration serializing bug involving
float("nan")andfloat("inf")(#23770). - Fixed a regression where custom form fields having a
querysetattribute but nolimit_choices_tocould not be used in aModelForm(#23795). - Fixed a custom field type validation error with MySQL backend when
db_typereturnedNone(#23761). - Fixed a migration crash when a field is renamed that is part of an
index_together(#23859). - Fixed
squashmigrationsto respect the--no-optimizeparameter (#23799). - Made
RenameModelreversible (#22248) - Avoided unnecessary rollbacks of migrations from other apps when migrating backwards (#23410).
- 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
index/unique_togetherconstraint (#23794). - Fixed
django.core.files.File.__repr__()when the file’snamecontains Unicode characters (#23888). - Added missing context to the admin’s
delete_selectedview that prevented custom site header, etc. from appearing (#23898). - 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_togetherhandling for SQLite (#23880). - Fixed a crash when
RunSQLSQL content was collected by the schema editor, typically when usingsqlmigrate(#23909). - Fixed a regression in
contrib.adminadd/change views which caused someModelAdminmethods to receive the incorrectobjvalue (#23934). - Fixed
runservercrash when socket error message contained Unicode characters (#23946). - Fixed serialization of
typewhen adding adeconstruct()method (#23950). - Prevented the
django.contrib.auth.middleware.SessionAuthenticationMiddlewarefrom setting a"Vary: Cookie"header on all responses (#23939). - Fixed a crash when adding
blank=TruetoTextField()on MySQL (#23920). - Fixed index creation by the migration infrastructure, particularly when
dealing with PostgreSQL specific
{text|varchar}_pattern_opsindexes (#23954). - Fixed bug in
makemigrationsthat created broken migration files when dealing with multiple table inheritance and inheriting from more than one model (#23956). - Fixed a crash when a
MultiValueFieldhas invalid data (#23674). - Fixed a crash in the admin when using “Save as new” and also deleting a related inline (#23857).
- Always converted
related_nameto text (unicode), since that is required on Python 3 for interpolation. Removed conversion ofrelated_nameto text in migration deconstruction (#23455 and #23982). - Enlarged the sizes of tablespaces which are created by default for testing on Oracle (the main tablespace was increased from 200M to 300M and the temporary tablespace from 100M to 150M). This was required to accommodate growth in Django’s own test suite (#23969).
- Fixed
timesincefilter translations in Korean (#23989). - Fixed the SQLite
SchemaEditorto properly add defaults in the absence of a user specifieddefault. For example, aCharFieldwithblank=Truedidn’t set existing rows to an empty string which resulted in a crash when adding theNOT NULLconstraint (#23987). makemigrationsno longer prompts for a default value when addingTextField()orCharField()without adefault(#23405).- Fixed a migration crash when adding
order_with_respect_toto a table with existing rows (#23983). - Restored the
pre_migratesignal if all apps have migrations (#23975). - Made admin system checks run for custom
AdminSites (#23497). - 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
AppRegistryNotReadyexception (#24007). - Added quoting to field indexes in the SQL generated by migrations to prevent a crash when the index name requires it (##24015).
- Added
datetime.timesupport to migrations questioner (#23998). - Fixed admindocs crash on apps installed as eggs (#23525).
- Changed migrations autodetector to generate an
AlterModelOptionsoperation instead ofDeleteModelandCreateModeloperations when changingMeta.managed. This prevents data loss when changingmanagedfromFalsetoTrueand vice versa (#24037). - Enabled the
sqlsequenceresetcommand on apps with migrations (#24054). - Added tablespace SQL to apps with migrations (#24051).
- Corrected
contrib.sitesdefault site creation in a multiple database setup (#24000). - Restored support for objects that aren’t
strorbytesindjango.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 DEFAULTSQL in migrations (#23581). - Restored the ability to use more than five levels of subqueries (#23758).
- Fixed crash when
ValidationErroris initialized with aValidationErrorthat is initialized with a dictionary (#24008). - Prevented a crash on apps without migrations when running
migrate --list(#23366).