{"title":"Django 1.7.2 release notes","version":"dev","locale":"en","docname":"releases/1.7.2","url":"/en/dev/releases/1.7.2/","canonical":"https://djangodocs.dev/en/dev/releases/1.7.2/","summary":"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).","html":"<h1>Django 1.7.2 release notes<a class=\"heading-anchor\" href=\"#django-1-7-2-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>January 2, 2015</em></p>\n<p>Django 1.7.2 fixes several bugs in 1.7.1.</p>\n<p>Additionally, Django’s vendored version of six, <code class=\"docutils literal notranslate\">django.utils.six</code>, has\nbeen upgraded to the latest release (1.9.0).</p>\n<section id=\"bugfixes\">\n<h2>Bugfixes<a class=\"heading-anchor\" href=\"#bugfixes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<ul class=\"simple\">\n<li><p>Fixed migration’s renaming of auto-created many-to-many tables when changing\n<a class=\"reference internal\" href=\"/en/dev/ref/models/options/#django.db.models.Options.db_table\" title=\"django.db.models.Options.db_table\"><code class=\"xref py py-attr docutils literal notranslate\">Meta.db_table</code></a> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23630\">#23630</a>).</p></li>\n<li><p>Fixed a migration crash when adding an explicit <code class=\"docutils literal notranslate\">id</code> field to a model on\nSQLite (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23702\">#23702</a>).</p></li>\n<li><p>Added a warning for duplicate models when a module is reloaded. Previously a\n<code class=\"docutils literal notranslate\">RuntimeError</code> was raised every time two models clashed in the app\nregistry. (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23621\">#23621</a>).</p></li>\n<li><p>Prevented <a class=\"reference internal\" href=\"/en/dev/ref/django-admin/#django-admin-flush\"><code class=\"xref std std-djadmin docutils literal notranslate\">flush</code></a> from loading initial data for migrated apps\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23699\">#23699</a>).</p></li>\n<li><p>Fixed a <a class=\"reference internal\" href=\"/en/dev/ref/django-admin/#django-admin-makemessages\"><code class=\"xref std std-djadmin docutils literal notranslate\">makemessages</code></a> regression in 1.7.1 when\n<a class=\"reference internal\" href=\"/en/dev/ref/settings/#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\">STATIC_ROOT</code></a> has the default <code class=\"docutils literal notranslate\">None</code> value (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23717\">#23717</a>).</p></li>\n<li><p>Added GeoDjango compatibility with mysqlclient database driver.</p></li>\n<li><p>Fixed MySQL 5.6+ crash with <code class=\"docutils literal notranslate\">GeometryField</code>s in migrations\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23719\">#23719</a>).</p></li>\n<li><p>Fixed a migration crash when removing a field that is referenced in\n<code class=\"docutils literal notranslate\">AlterIndexTogether</code> or <code class=\"docutils literal notranslate\">AlterUniqueTogether</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23614\">#23614</a>).</p></li>\n<li><p>Updated the first day of the week in the Ukrainian locale to Monday.</p></li>\n<li><p>Added support for transactional spatial metadata initialization on\nSpatiaLite 4.1+ (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23152\">#23152</a>).</p></li>\n<li><p>Fixed a migration crash that prevented changing a nullable field with a\ndefault to non-nullable with the same default (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23738\">#23738</a>).</p></li>\n<li><p>Fixed a migration crash when adding <code class=\"docutils literal notranslate\">GeometryField</code>s with <code class=\"docutils literal notranslate\">blank=True</code>\non PostGIS (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23731\">#23731</a>).</p></li>\n<li><p>Allowed usage of <code class=\"docutils literal notranslate\">DateTimeField()</code> as <code class=\"docutils literal notranslate\">Transform.output_field</code>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23420\">#23420</a>).</p></li>\n<li><p>Fixed a migration serializing bug involving <code class=\"docutils literal notranslate\">float(&quot;nan&quot;)</code> and\n<code class=\"docutils literal notranslate\">float(&quot;inf&quot;)</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23770\">#23770</a>).</p></li>\n<li><p>Fixed a regression where custom form fields having a <code class=\"docutils literal notranslate\">queryset</code> attribute\nbut no <code class=\"docutils literal notranslate\">limit_choices_to</code> could not be used in a\n<a class=\"reference internal\" href=\"/en/dev/topics/forms/modelforms/#django.forms.ModelForm\" title=\"django.forms.ModelForm\"><code class=\"xref py py-class docutils literal notranslate\">ModelForm</code></a> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23795\">#23795</a>).</p></li>\n<li><p>Fixed a custom field type validation error with MySQL backend when\n<code class=\"docutils literal notranslate\">db_type</code> returned <code class=\"docutils literal notranslate\">None</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23761\">#23761</a>).</p></li>\n<li><p>Fixed a migration crash when a field is renamed that is part of an\n<code class=\"docutils literal notranslate\">index_together</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23859\">#23859</a>).</p></li>\n<li><p>Fixed <a class=\"reference internal\" href=\"/en/dev/ref/django-admin/#django-admin-squashmigrations\"><code class=\"xref std std-djadmin docutils literal notranslate\">squashmigrations</code></a> to respect the <code class=\"docutils literal notranslate\">--no-optimize</code> parameter\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23799\">#23799</a>).</p></li>\n<li><p>Made <a class=\"reference internal\" href=\"/en/dev/ref/migration-operations/#django.db.migrations.operations.RenameModel\" title=\"django.db.migrations.operations.RenameModel\"><code class=\"xref py py-class docutils literal notranslate\">RenameModel</code></a> reversible\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/22248\">#22248</a>)</p></li>\n<li><p>Avoided unnecessary rollbacks of migrations from other apps when migrating\nbackwards (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23410\">#23410</a>).</p></li>\n<li><p>Fixed a rare query error when using deeply nested subqueries\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23605\">#23605</a>).</p></li>\n<li><p>Fixed a crash in migrations when deleting a field that is part of a\n<code class=\"docutils literal notranslate\">index/unique_together</code> constraint (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23794\">#23794</a>).</p></li>\n<li><p>Fixed <code class=\"docutils literal notranslate\">django.core.files.File.__repr__()</code> when the file’s <code class=\"docutils literal notranslate\">name</code> contains\nUnicode characters (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23888\">#23888</a>).</p></li>\n<li><p>Added missing context to the admin’s <code class=\"docutils literal notranslate\">delete_selected</code> view that prevented\ncustom site header, etc. from appearing (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23898\">#23898</a>).</p></li>\n<li><p>Fixed a regression with dynamically generated inlines and allowed field\nreferences in the admin (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23754\">#23754</a>).</p></li>\n<li><p>Fixed an infinite loop bug for certain cyclic migration dependencies, and\nmade the error message for cyclic dependencies much more helpful.</p></li>\n<li><p>Added missing <code class=\"docutils literal notranslate\">index_together</code> handling for SQLite (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23880\">#23880</a>).</p></li>\n<li><p>Fixed a crash when <code class=\"docutils literal notranslate\">RunSQL</code> SQL content was collected by the schema editor,\ntypically when using <code class=\"docutils literal notranslate\">sqlmigrate</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23909\">#23909</a>).</p></li>\n<li><p>Fixed a regression in <code class=\"docutils literal notranslate\">contrib.admin</code> add/change views which caused some\n<code class=\"docutils literal notranslate\">ModelAdmin</code> methods to receive the incorrect <code class=\"docutils literal notranslate\">obj</code> value\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23934\">#23934</a>).</p></li>\n<li><p>Fixed <code class=\"docutils literal notranslate\">runserver</code> crash when socket error message contained Unicode\ncharacters (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23946\">#23946</a>).</p></li>\n<li><p>Fixed serialization of <code class=\"docutils literal notranslate\">type</code> when adding a <code class=\"docutils literal notranslate\">deconstruct()</code> method\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23950\">#23950</a>).</p></li>\n<li><p>Prevented the\n<code class=\"docutils literal notranslate\">django.contrib.auth.middleware.SessionAuthenticationMiddleware</code> from\nsetting a <code class=\"docutils literal notranslate\">&quot;Vary: Cookie&quot;</code> header on all responses (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23939\">#23939</a>).</p></li>\n<li><p>Fixed a crash when adding <code class=\"docutils literal notranslate\">blank=True</code> to <code class=\"docutils literal notranslate\">TextField()</code> on MySQL\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23920\">#23920</a>).</p></li>\n<li><p>Fixed index creation by the migration infrastructure, particularly when\ndealing with PostgreSQL specific <code class=\"docutils literal notranslate\">{text|varchar}_pattern_ops</code> indexes\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23954\">#23954</a>).</p></li>\n<li><p>Fixed bug in <code class=\"docutils literal notranslate\">makemigrations</code> that created broken migration files when\ndealing with multiple table inheritance and inheriting from more than one\nmodel (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23956\">#23956</a>).</p></li>\n<li><p>Fixed a crash when a <code class=\"docutils literal notranslate\">MultiValueField</code> has invalid data (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23674\">#23674</a>).</p></li>\n<li><p>Fixed a crash in the admin when using “Save as new” and also deleting a\nrelated inline (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23857\">#23857</a>).</p></li>\n<li><p>Always converted <code class=\"docutils literal notranslate\">related_name</code> to text (Unicode), since that is required\non Python 3 for interpolation. Removed conversion of <code class=\"docutils literal notranslate\">related_name</code> to text\nin migration deconstruction (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23455\">#23455</a> and <a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23982\">#23982</a>).</p></li>\n<li><p>Enlarged the sizes of tablespaces which are created by default for testing\non Oracle (the main tablespace was increased from 200M to 300M and the\ntemporary tablespace from 100M to 150M). This was required to accommodate\ngrowth in Django’s own test suite (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23969\">#23969</a>).</p></li>\n<li><p>Fixed <code class=\"docutils literal notranslate\">timesince</code> filter translations in Korean (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23989\">#23989</a>).</p></li>\n<li><p>Fixed the SQLite <code class=\"docutils literal notranslate\">SchemaEditor</code> to properly add defaults in the absence of\na user specified <code class=\"docutils literal notranslate\">default</code>. For example, a <code class=\"docutils literal notranslate\">CharField</code> with\n<code class=\"docutils literal notranslate\">blank=True</code> didn’t set existing rows to an empty string which resulted in\na crash when adding the <code class=\"docutils literal notranslate\">NOT NULL</code> constraint (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23987\">#23987</a>).</p></li>\n<li><p><code class=\"docutils literal notranslate\">makemigrations</code> no longer prompts for a default value when adding\n<code class=\"docutils literal notranslate\">TextField()</code> or <code class=\"docutils literal notranslate\">CharField()</code> without a <code class=\"docutils literal notranslate\">default</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23405\">#23405</a>).</p></li>\n<li><p>Fixed a migration crash when adding <code class=\"docutils literal notranslate\">order_with_respect_to</code> to a table\nwith existing rows (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23983\">#23983</a>).</p></li>\n<li><p>Restored the <code class=\"docutils literal notranslate\">pre_migrate</code> signal if all apps have migrations\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23975\">#23975</a>).</p></li>\n<li><p>Made admin system checks run for custom <code class=\"docutils literal notranslate\">AdminSite</code>s (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23497\">#23497</a>).</p></li>\n<li><p>Ensured the app registry is fully populated when unpickling models. When an\nexternal script (like a queueing infrastructure) reloads pickled models, it\ncould crash with an <code class=\"docutils literal notranslate\">AppRegistryNotReady</code> exception (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/24007\">#24007</a>).</p></li>\n<li><p>Added quoting to field indexes in the SQL generated by migrations to prevent\na crash when the index name requires it (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/24015\">#24015</a>).</p></li>\n<li><p>Added <code class=\"docutils literal notranslate\">datetime.time</code> support to migrations questioner (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23998\">#23998</a>).</p></li>\n<li><p>Fixed admindocs crash on apps installed as eggs (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23525\">#23525</a>).</p></li>\n<li><p>Changed migrations autodetector to generate an <code class=\"docutils literal notranslate\">AlterModelOptions</code>\noperation instead of <code class=\"docutils literal notranslate\">DeleteModel</code> and <code class=\"docutils literal notranslate\">CreateModel</code> operations when\nchanging <code class=\"docutils literal notranslate\">Meta.managed</code>. This prevents data loss when changing <code class=\"docutils literal notranslate\">managed</code>\nfrom <code class=\"docutils literal notranslate\">False</code> to <code class=\"docutils literal notranslate\">True</code> and vice versa (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/24037\">#24037</a>).</p></li>\n<li><p>Enabled the <code class=\"docutils literal notranslate\">sqlsequencereset</code> command on apps with migrations\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/24054\">#24054</a>).</p></li>\n<li><p>Added tablespace SQL to apps with migrations (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/24051\">#24051</a>).</p></li>\n<li><p>Corrected <code class=\"docutils literal notranslate\">contrib.sites</code> default site creation in a multiple database\nsetup (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/24000\">#24000</a>).</p></li>\n<li><p>Restored support for objects that aren’t <a class=\"reference external\" href=\"https://docs.python.org/3/library/stdtypes.html#str\" title=\"(in Python v3.14)\"><code class=\"xref py py-class docutils literal notranslate\">str</code></a> or <a class=\"reference external\" href=\"https://docs.python.org/3/library/stdtypes.html#bytes\" title=\"(in Python v3.14)\"><code class=\"xref py py-class docutils literal notranslate\">bytes</code></a> in\n<code class=\"docutils literal notranslate\">django.utils.safestring.mark_for_escaping()</code> on Python 3.</p></li>\n<li><p>Supported strings escaped by third-party libraries with the <code class=\"docutils literal notranslate\">__html__</code>\nconvention in the template engine (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23831\">#23831</a>).</p></li>\n<li><p>Prevented extraneous <code class=\"docutils literal notranslate\">DROP DEFAULT</code> SQL in migrations (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23581\">#23581</a>).</p></li>\n<li><p>Restored the ability to use more than five levels of subqueries\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23758\">#23758</a>).</p></li>\n<li><p>Fixed crash when <code class=\"docutils literal notranslate\">ValidationError</code> is initialized with a\n<code class=\"docutils literal notranslate\">ValidationError</code> that is initialized with a dictionary (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/24008\">#24008</a>).</p></li>\n<li><p>Prevented a crash on apps without migrations when running <code class=\"docutils literal notranslate\">migrate --list</code>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23366\">#23366</a>).</p></li>\n</ul>\n</section>","rootId":"django-1-7-2-release-notes","toc":[{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/1.7.3","title":"Django 1.7.3 release notes","url":"/en/dev/releases/1.7.3/"},"next":{"docname":"releases/1.7.1","title":"Django 1.7.1 release notes","url":"/en/dev/releases/1.7.1/"},"formats":{"html":"/en/dev/releases/1.7.2/","markdown":"/en/dev/releases/1.7.2.md","json":"/en/dev/releases/1.7.2.json"},"source":"https://github.com/django/django/blob/main/docs/releases/1.7.2.txt","official":"https://docs.djangoproject.com/en/dev/releases/1.7.2/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9","1.8"],"inLocales":["en"]}