{"title":"Django 1.7.1 release notes","version":"dev","locale":"en","docname":"releases/1.7.1","url":"/en/dev/releases/1.7.1/","canonical":"https://djangodocs.dev/en/dev/releases/1.7.1/","summary":"Django 1.7.1 fixes several bugs in 1.7. Allowed related many-to-many fields to be referenced in the admin (#23604).","html":"<h1>Django 1.7.1 release notes<a class=\"heading-anchor\" href=\"#django-1-7-1-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>October 22, 2014</em></p>\n<p>Django 1.7.1 fixes several bugs in 1.7.</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>Allowed related many-to-many fields to be referenced in the admin\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23604\">#23604</a>).</p></li>\n<li><p>Added a more helpful error message if you try to migrate an app without first\ncreating the <code class=\"docutils literal notranslate\">contenttypes</code> table (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/22411\">#22411</a>).</p></li>\n<li><p>Modified migrations dependency algorithm to avoid possible infinite\nrecursion.</p></li>\n<li><p>Fixed a <code class=\"docutils literal notranslate\">UnicodeDecodeError</code> when the <code class=\"docutils literal notranslate\">flush</code> error message contained\nUnicode characters (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/22882\">#22882</a>).</p></li>\n<li><p>Reinstated missing <code class=\"docutils literal notranslate\">CHECK</code> SQL clauses which were omitted on some backends\nwhen not using migrations (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23416\">#23416</a>).</p></li>\n<li><p>Fixed serialization of <code class=\"docutils literal notranslate\">type</code> objects in migrations (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/22951\">#22951</a>).</p></li>\n<li><p>Allowed inline and hidden references to admin fields (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23431\">#23431</a>).</p></li>\n<li><p>The <code class=\"docutils literal notranslate\">&#64;deconstructible</code> decorator now fails with a <code class=\"docutils literal notranslate\">ValueError</code> if the\ndecorated object cannot automatically be imported (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23418\">#23418</a>).</p></li>\n<li><p>Fixed a typo in an <code class=\"docutils literal notranslate\">inlineformset_factory()</code> error message that caused a\ncrash (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23451\">#23451</a>).</p></li>\n<li><p>Restored the ability to use <a class=\"reference internal\" href=\"/en/dev/ref/settings/#std-setting-ABSOLUTE_URL_OVERRIDES\"><code class=\"xref std std-setting docutils literal notranslate\">ABSOLUTE_URL_OVERRIDES</code></a> with the\n<code class=\"docutils literal notranslate\">'auth.User'</code> model (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/11775\">#11775</a>). As a side effect, the setting now\nadds a <code class=\"docutils literal notranslate\">get_absolute_url()</code> method to any model that appears in\n<code class=\"docutils literal notranslate\">ABSOLUTE_URL_OVERRIDES</code> but doesn’t define <code class=\"docutils literal notranslate\">get_absolute_url()</code>.</p></li>\n<li><p>Avoided masking some <code class=\"docutils literal notranslate\">ImportError</code> exceptions during application loading\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/22920\">#22920</a>).</p></li>\n<li><p>Empty <code class=\"docutils literal notranslate\">index_together</code> or <code class=\"docutils literal notranslate\">unique_together</code> model options no longer\nresults in infinite migrations (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23452\">#23452</a>).</p></li>\n<li><p>Fixed crash in <code class=\"docutils literal notranslate\">contrib.sitemaps</code> if <code class=\"docutils literal notranslate\">lastmod</code> returned a <code class=\"docutils literal notranslate\">date</code> rather\nthan a <code class=\"docutils literal notranslate\">datetime</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23403\">#23403</a>).</p></li>\n<li><p>Allowed migrations to work with <code class=\"docutils literal notranslate\">app_label</code>s that have the same last\npart (e.g. <code class=\"docutils literal notranslate\">django.contrib.auth</code> and <code class=\"docutils literal notranslate\">vendor.auth</code>) (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23483\">#23483</a>).</p></li>\n<li><p>Restored the ability to deepcopy <code class=\"docutils literal notranslate\">F</code> objects (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23492\">#23492</a>).</p></li>\n<li><p>Formats for Welsh (<code class=\"docutils literal notranslate\">cy</code>) and several Chinese locales (<code class=\"docutils literal notranslate\">zh_CN</code>,\n<code class=\"docutils literal notranslate\">zh_Hans</code>, <code class=\"docutils literal notranslate\">zh_Hant</code> and <code class=\"docutils literal notranslate\">zh_TW</code>) have been added. Formats for\nMacedonian have been fixed (trailing dot removed, <a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23532\">#23532</a>).</p></li>\n<li><p>Added quoting of constraint names in the SQL generated by migrations to\nprevent crash with uppercase characters in the name (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23065\">#23065</a>).</p></li>\n<li><p>Fixed renaming of models with a self-referential many-to-many field\n(<code class=\"docutils literal notranslate\">ManyToManyField('self')</code>) (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23503\">#23503</a>).</p></li>\n<li><p>Added the <a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin.get_extra\" title=\"django.contrib.admin.InlineModelAdmin.get_extra\"><code class=\"xref py py-meth docutils literal notranslate\">get_extra()</code></a>,\n<a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin.get_max_num\" title=\"django.contrib.admin.InlineModelAdmin.get_max_num\"><code class=\"xref py py-meth docutils literal notranslate\">get_max_num()</code></a>, and\n<a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin.get_min_num\" title=\"django.contrib.admin.InlineModelAdmin.get_min_num\"><code class=\"xref py py-meth docutils literal notranslate\">get_min_num()</code></a> hooks to\n<a class=\"reference internal\" href=\"/en/dev/ref/contrib/contenttypes/#django.contrib.contenttypes.admin.GenericInlineModelAdmin\" title=\"django.contrib.contenttypes.admin.GenericInlineModelAdmin\"><code class=\"xref py py-class docutils literal notranslate\">GenericInlineModelAdmin</code></a>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23539\">#23539</a>).</p></li>\n<li><p>Made <code class=\"docutils literal notranslate\">migrations.RunSQL</code> no longer require percent sign escaping. This is\nnow consistent with <code class=\"docutils literal notranslate\">cursor.execute()</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23426\">#23426</a>).</p></li>\n<li><p>Made the <code class=\"docutils literal notranslate\">SERIALIZE</code> entry in the <a class=\"reference internal\" href=\"/en/dev/ref/settings/#std-setting-DATABASE-TEST\"><code class=\"xref std std-setting docutils literal notranslate\">TEST</code></a>\ndictionary usable (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23421\">#23421</a>).</p></li>\n<li><p>Fixed bug in migrations that prevented foreign key constraints to unmanaged\nmodels with a custom primary key (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23415\">#23415</a>).</p></li>\n<li><p>Added <code class=\"docutils literal notranslate\">SchemaEditor</code> for MySQL GIS backend so that spatial indexes will be\ncreated for apps with migrations (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23538\">#23538</a>).</p></li>\n<li><p>Added <code class=\"docutils literal notranslate\">SchemaEditor</code> for Oracle GIS backend so that spatial metadata and\nindexes will be created for apps with migrations (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23537\">#23537</a>).</p></li>\n<li><p>Coerced the <code class=\"docutils literal notranslate\">related_name</code> model field option to Unicode during migration\ngeneration to generate migrations that work with both Python 2 and 3\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23455\">#23455</a>).</p></li>\n<li><p>Fixed <code class=\"docutils literal notranslate\">MigrationWriter</code> to handle builtin types without imports\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23560\">#23560</a>).</p></li>\n<li><p>Fixed <code class=\"docutils literal notranslate\">deepcopy</code> on <code class=\"docutils literal notranslate\">ErrorList</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23594\">#23594</a>).</p></li>\n<li><p>Made the <a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/admindocs/#module-django.contrib.admindocs\" title=\"django.contrib.admindocs: Django's admin documentation generator.\"><code class=\"xref py py-mod docutils literal notranslate\">admindocs</code></a> view to browse view details check\nif the view specified in the URL exists in the URLconf. Previously it was\npossible to import arbitrary packages from the Python path. This was not\nconsidered a security issue because <code class=\"docutils literal notranslate\">admindocs</code> is only accessible to staff\nusers (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23601\">#23601</a>).</p></li>\n<li><p>Fixed <code class=\"docutils literal notranslate\">UnicodeDecodeError</code> crash in <code class=\"docutils literal notranslate\">AdminEmailHandler</code> with non-ASCII\ncharacters in the request (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23593\">#23593</a>).</p></li>\n<li><p>Fixed missing <code class=\"docutils literal notranslate\">get_or_create</code> and <code class=\"docutils literal notranslate\">update_or_create</code> on related managers\ncausing <code class=\"docutils literal notranslate\">IntegrityError</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23611\">#23611</a>).</p></li>\n<li><p>Made <a class=\"reference internal\" href=\"/en/dev/ref/utils/#django.utils.http.urlsafe_base64_decode\" title=\"django.utils.http.urlsafe_base64_decode\"><code class=\"xref py py-func docutils literal notranslate\">urlsafe_base64_decode()</code></a> return the proper\ntype (bytestring) on Python 3 (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23333\">#23333</a>).</p></li>\n<li><p><a class=\"reference internal\" href=\"/en/dev/ref/django-admin/#django-admin-makemigrations\"><code class=\"xref std std-djadmin docutils literal notranslate\">makemigrations</code></a> can now serialize timezone-aware values\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23365\">#23365</a>).</p></li>\n<li><p>Added a prompt to the migrations questioner when removing the null constraint\nfrom a field to prevent an IntegrityError on existing NULL rows\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23609\">#23609</a>).</p></li>\n<li><p>Fixed generic relations in <code class=\"docutils literal notranslate\">ModelAdmin.list_filter</code> (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23616\">#23616</a>).</p></li>\n<li><p>Restored RFC compliance for the SMTP backend on Python 3 (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23063\">#23063</a>).</p></li>\n<li><p>Fixed a crash while parsing cookies containing invalid content\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23638\">#23638</a>).</p></li>\n<li><p>The system check framework now raises error <strong>models.E020</strong> when the\nclass method <code class=\"docutils literal notranslate\">Model.check()</code> is unreachable (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23615\">#23615</a>).</p></li>\n<li><p>Made the Oracle test database creation drop the test user in the event of an\nunclean exit of a previous test run (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23649\">#23649</a>).</p></li>\n<li><p>Fixed <a class=\"reference internal\" href=\"/en/dev/ref/django-admin/#django-admin-makemigrations\"><code class=\"xref std std-djadmin docutils literal notranslate\">makemigrations</code></a> to detect changes to\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/23629\">#23629</a>).</p></li>\n<li><p>Fixed a regression when feeding the Django test client with an empty data\nstring (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/21740\">#21740</a>).</p></li>\n<li><p>Fixed a regression in <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> where static files were\nunexpectedly ignored (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/23583\">#23583</a>).</p></li>\n</ul>\n</section>","rootId":"django-1-7-1-release-notes","toc":[{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/1.7.2","title":"Django 1.7.2 release notes","url":"/en/dev/releases/1.7.2/"},"next":{"docname":"releases/1.7","title":"Django 1.7 release notes","url":"/en/dev/releases/1.7/"},"formats":{"html":"/en/dev/releases/1.7.1/","markdown":"/en/dev/releases/1.7.1.md","json":"/en/dev/releases/1.7.1.json"},"source":"https://github.com/django/django/blob/main/docs/releases/1.7.1.txt","official":"https://docs.djangoproject.com/en/dev/releases/1.7.1/","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"]}