{"title":"Django 1.0 release notes","version":"dev","locale":"en","docname":"releases/1.0","url":"/en/dev/releases/1.0/","canonical":"https://djangodocs.dev/en/dev/releases/1.0/","summary":"Welcome to Django 1.0! We’ve been looking forward to this moment for over three years, and it’s finally here.","html":"<h1>Django 1.0 release notes<a class=\"heading-anchor\" href=\"#django-1-0-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>Welcome to Django 1.0!</p>\n<p>We’ve been looking forward to this moment for over three years, and it’s\nfinally here. Django 1.0 represents the largest milestone in Django’s\ndevelopment to date: a web framework that a group of perfectionists can truly\nbe proud of.</p>\n<p>Django 1.0 represents over three years of community development as an Open\nSource project. Django’s received contributions from hundreds of developers,\nbeen translated into fifty languages, and today is used by developers on every\ncontinent and in every kind of job.</p>\n<p>An interesting historical note: when Django was first released in July 2005,\nthe initial released version of Django came from an internal repository at\nrevision number 8825. Django 1.0 represents revision 8961 of our public\nrepository. It seems fitting that our 1.0 release comes at the moment where\ncommunity contributions overtake those made privately.</p>\n<section id=\"stability-and-forwards-compatibility\">\n<h2>Stability and forwards-compatibility<a class=\"heading-anchor\" href=\"#stability-and-forwards-compatibility\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>The release of Django 1.0 comes with a promise of API\nstability and forwards-compatibility. In a nutshell, this means that code you\ndevelop against Django 1.0 will continue to work against 1.1 unchanged, and you\nshould need to make only minor changes for any 1.X release.</p>\n<p>See the <a class=\"reference internal\" href=\"/en/dev/misc/api-stability/\"><span class=\"doc\">API stability guide</span></a> for full details.</p>\n</section>\n<section id=\"backwards-incompatible-changes\">\n<h2>Backwards-incompatible changes<a class=\"heading-anchor\" href=\"#backwards-incompatible-changes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Django 1.0 has a number of backwards-incompatible changes from Django 0.96. If\nyou have apps written against Django 0.96 that you need to port, see our\ndetailed porting guide:</p>\n<div class=\"toctree-wrapper compound\">\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/en/dev/releases/1.0-porting-guide/\">Porting your apps from Django 0.96 to 1.0</a></li>\n</ul>\n</div>\n<p>A complete list of backwards-incompatible changes can be found at\n<a class=\"reference external\" href=\"https://code.djangoproject.com/wiki/BackwardsIncompatibleChanges\">https://code.djangoproject.com/wiki/BackwardsIncompatibleChanges</a>.</p>\n</section>\n<section id=\"what-s-new-in-django-1-0\">\n<h2>What’s new in Django 1.0<a class=\"heading-anchor\" href=\"#what-s-new-in-django-1-0\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>A <em>lot</em>!</p>\n<p>Since Django 0.96, we’ve made over 4,000 code commits, fixed more than 2,000\nbugs, and edited, added, or removed around 350,000 lines of code. We’ve also\nadded 40,000 lines of new documentation, and greatly improved what was already\nthere.</p>\n<p>In fact, new documentation is one of our favorite features of Django 1.0, so we\nmight as well start there. First, there’s a new documentation site:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://docs.djangoproject.com/\">https://docs.djangoproject.com/</a></p></li>\n</ul>\n<p>The documentation has been greatly improved, cleaned up, and generally made\nawesome. There’s now dedicated search, indexes, and more.</p>\n<p>We can’t possibly document everything that’s new in 1.0, but the documentation\nwill be your definitive guide. Anywhere you see something like:</p>\n<aside class=\"version-note version-added\" data-version=\"1.0\" role=\"note\">\n<p class=\"version-note-title\">New in Django 1.0</p><p>This feature is new in Django 1.0</p>\n</aside>\n<p>You’ll know that you’re looking at something new or changed.</p>\n<p>The other major highlights of Django 1.0 are:</p>\n<section id=\"refactored-admin-application\">\n<h3>Refactored admin application<a class=\"heading-anchor\" href=\"#refactored-admin-application\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The Django administrative interface (<code class=\"docutils literal notranslate\">django.contrib.admin</code>) has been\ncompletely refactored; admin definitions are now completely decoupled from\nmodel definitions (no more <code class=\"docutils literal notranslate\">class Admin</code> declaration in models!), rewritten\nto use Django’s new form-handling library (introduced in the 0.96 release as\n<code class=\"docutils literal notranslate\">django.newforms</code>, and now available as simply <code class=\"docutils literal notranslate\">django.forms</code>) and\nredesigned with extensibility and customization in mind. Full documentation for\nthe admin application is available online in the official Django documentation:</p>\n<p>See the <a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/\"><span class=\"doc\">admin reference</span></a> for details</p>\n</section>\n<section id=\"improved-unicode-handling\">\n<h3>Improved Unicode handling<a class=\"heading-anchor\" href=\"#improved-unicode-handling\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Django’s internals have been refactored to use Unicode throughout; this\ndrastically simplifies the task of dealing with non-Western-European content\nand data in Django. Additionally, utility functions have been provided to ease\ninteroperability with third-party libraries and systems which may or may not\nhandle Unicode gracefully. Details are available in Django’s Unicode-handling\ndocumentation.</p>\n<p>See <a class=\"reference internal\" href=\"/en/dev/ref/unicode/\"><span class=\"doc\">Unicode data</span></a>.</p>\n</section>\n<section id=\"an-improved-orm\">\n<h3>An improved ORM<a class=\"heading-anchor\" href=\"#an-improved-orm\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Django’s object-relational mapper – the component which provides the mapping\nbetween Django model classes and your database, and which mediates your\ndatabase queries – has been dramatically improved by a massive refactoring.\nFor most users of Django this is backwards-compatible; the public-facing API\nfor database querying underwent a few minor changes, but most of the updates\ntook place in the ORM’s internals. A guide to the changes, including\nbackwards-incompatible modifications and mentions of new features opened up by\nthis refactoring, is <a class=\"reference external\" href=\"https://code.djangoproject.com/wiki/QuerysetRefactorBranch\">available on the Django wiki</a>.</p>\n</section>\n<section id=\"automatic-escaping-of-template-variables\">\n<h3>Automatic escaping of template variables<a class=\"heading-anchor\" href=\"#automatic-escaping-of-template-variables\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>To provide improved security against cross-site scripting (XSS)\nvulnerabilities, Django’s template system now automatically escapes the output\nof variables. This behavior is configurable, and allows both variables and\nlarger template constructs to be marked as safe (requiring no escaping) or\nunsafe (requiring escaping). A full guide to this feature is in the\ndocumentation for the\n<a class=\"reference internal\" href=\"/en/dev/ref/templates/builtins/#std-templatetag-autoescape\"><code class=\"xref std std-ttag docutils literal notranslate\">autoescape</code></a> tag.</p>\n</section>\n<section id=\"django-contrib-gis-geodjango\">\n<h3><code class=\"docutils literal notranslate\">django.contrib.gis</code> (GeoDjango)<a class=\"heading-anchor\" href=\"#django-contrib-gis-geodjango\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>A project over a year in the making, this adds world-class GIS (<a class=\"reference external\" href=\"https://en.wikipedia.org/wiki/Geographic_information_system\">Geographic\nInformation Systems</a>) support to Django, in the form of a <code class=\"docutils literal notranslate\">contrib</code>\napplication. Its documentation is currently being maintained externally, and\nwill be merged into the main Django documentation shortly. Huge thanks go to\nJustin Bronn, Jeremy Dunck, Brett Hoerner and Travis Pinney for their efforts\nin creating and completing this feature.</p>\n<p>See <a class=\"reference internal\" href=\"/en/dev/ref/contrib/gis/\"><span class=\"doc\">GeoDjango</span></a> for details.</p>\n</section>\n<section id=\"pluggable-file-storage\">\n<h3>Pluggable file storage<a class=\"heading-anchor\" href=\"#pluggable-file-storage\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Django’s built-in <code class=\"docutils literal notranslate\">FileField</code> and <code class=\"docutils literal notranslate\">ImageField</code> now can take advantage of\npluggable file-storage backends, allowing extensive customization of where and\nhow uploaded files get stored by Django. For details, see <a class=\"reference internal\" href=\"/en/dev/topics/files/\"><span class=\"doc\">the files\ndocumentation</span></a>; big thanks go to Marty Alchin for putting in\nthe hard work to get this completed.</p>\n</section>\n<section id=\"jython-compatibility\">\n<h3>Jython compatibility<a class=\"heading-anchor\" href=\"#jython-compatibility\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Thanks to a lot of work from Leo Soto during a Google Summer of Code project,\nDjango’s codebase has been refactored to remove incompatibilities with\n<a class=\"reference external\" href=\"https://www.jython.org/\">Jython</a>, an implementation of Python written in Java, which runs Python code\non the Java Virtual Machine. Django is now compatible with the forthcoming\nJython 2.5 release.</p>\n</section>\n<section id=\"generic-relations-in-forms-and-admin\">\n<h3>Generic relations in forms and admin<a class=\"heading-anchor\" href=\"#generic-relations-in-forms-and-admin\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Classes are now included in <code class=\"docutils literal notranslate\">django.contrib.contenttypes</code> which can be used\nto support generic relations in both the admin interface and in end-user forms.\nSee <a class=\"reference internal\" href=\"/en/dev/ref/contrib/contenttypes/#generic-relations\"><span class=\"std std-ref\">the documentation for generic relations</span></a> for\ndetails.</p>\n</section>\n<section id=\"insert-update-distinction\">\n<h3><code class=\"docutils literal notranslate\">INSERT</code>/<code class=\"docutils literal notranslate\">UPDATE</code> distinction<a class=\"heading-anchor\" href=\"#insert-update-distinction\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Although Django’s default behavior of having a model’s <code class=\"docutils literal notranslate\">save()</code> method\nautomatically determine whether to perform an <code class=\"docutils literal notranslate\">INSERT</code> or an <code class=\"docutils literal notranslate\">UPDATE</code> at\nthe SQL level is suitable for the majority of cases, there are occasional\nsituations where forcing one or the other is useful. As a result, models can\nnow support an additional parameter to <code class=\"docutils literal notranslate\">save()</code> which can force a specific\noperation.</p>\n<p>See <a class=\"reference internal\" href=\"/en/dev/ref/models/instances/#ref-models-force-insert\"><span class=\"std std-ref\">Forcing an INSERT or UPDATE</span></a> for details.</p>\n</section>\n<section id=\"split-cachemiddleware\">\n<h3>Split <code class=\"docutils literal notranslate\">CacheMiddleware</code><a class=\"heading-anchor\" href=\"#split-cachemiddleware\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Django’s <code class=\"docutils literal notranslate\">CacheMiddleware</code> has been split into three classes:\n<code class=\"docutils literal notranslate\">CacheMiddleware</code> itself still exists and retains all of its previous\nfunctionality, but it is now built from two separate middleware classes which\nhandle the two parts of caching (inserting into and reading from the cache)\nseparately, offering additional flexibility for situations where combining\nthese functions into a single middleware posed problems.</p>\n<p>Full details, including updated notes on appropriate use, are in <a class=\"reference internal\" href=\"/en/dev/topics/cache/\"><span class=\"doc\">the\ncaching documentation</span></a>.</p>\n</section>\n<section id=\"refactored-django-contrib-comments\">\n<h3>Refactored <code class=\"docutils literal notranslate\">django.contrib.comments</code><a class=\"heading-anchor\" href=\"#refactored-django-contrib-comments\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>As part of a Google Summer of Code project, Thejaswi Puthraya carried out a\nmajor rewrite and refactoring of Django’s bundled comment system, greatly\nincreasing its flexibility and customizability.</p>\n</section>\n<section id=\"removal-of-deprecated-features\">\n<h3>Removal of deprecated features<a class=\"heading-anchor\" href=\"#removal-of-deprecated-features\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>A number of features and methods which had previously been marked as\ndeprecated, and which were scheduled for removal prior to the 1.0 release, are\nno longer present in Django. These include imports of the form library from\n<code class=\"docutils literal notranslate\">django.newforms</code> (now located simply at <code class=\"docutils literal notranslate\">django.forms</code>), the\n<code class=\"docutils literal notranslate\">form_for_model</code> and <code class=\"docutils literal notranslate\">form_for_instance</code> helper functions (which have been\nreplaced by <code class=\"docutils literal notranslate\">ModelForm</code>) and a number of deprecated features which were\nreplaced by the dispatcher, file-uploading and file-storage refactoring\nintroduced in the Django 1.0 alpha releases.</p>\n</section>\n</section>\n<section id=\"known-issues\">\n<h2>Known issues<a class=\"heading-anchor\" href=\"#known-issues\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>We’ve done our best to make Django 1.0 as solid as possible, but unfortunately\nthere are a couple of issues that we know about in the release.</p>\n<section id=\"multi-table-model-inheritance-with-to-field\">\n<h3>Multi-table model inheritance with <code class=\"docutils literal notranslate\">to_field</code><a class=\"heading-anchor\" href=\"#multi-table-model-inheritance-with-to-field\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>If you’re using <a class=\"reference internal\" href=\"/en/dev/topics/db/models/#multi-table-inheritance\"><span class=\"std std-ref\">multiple table model inheritance</span></a>, be aware of this caveat: child models using a\ncustom <code class=\"docutils literal notranslate\">parent_link</code> and <code class=\"docutils literal notranslate\">to_field</code> will cause database integrity errors. A\nset of models like the following are <strong>not valid</strong>:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"k\">class</span> <span class=\"nc\">Parent</span><span class=\"p\">(</span>models<span class=\"o\">.</span>Model<span class=\"p\">):</span>\n    name <span class=\"o\">=</span> models<span class=\"o\">.</span>CharField<span class=\"p\">(</span>max_length<span class=\"o\">=</span><span class=\"mi\">10</span><span class=\"p\">)</span>\n    other_value <span class=\"o\">=</span> models<span class=\"o\">.</span>IntegerField<span class=\"p\">(</span>unique<span class=\"o\">=</span><span class=\"kc\">True</span><span class=\"p\">)</span>\n\n\n<span class=\"k\">class</span> <span class=\"nc\">Child</span><span class=\"p\">(</span>Parent<span class=\"p\">):</span>\n    father <span class=\"o\">=</span> models<span class=\"o\">.</span>OneToOneField<span class=\"p\">(</span>\n        Parent<span class=\"p\">,</span> primary_key<span class=\"o\">=</span><span class=\"kc\">True</span><span class=\"p\">,</span> to_field<span class=\"o\">=</span><span class=\"s2\">&quot;other_value&quot;</span><span class=\"p\">,</span> parent_link<span class=\"o\">=</span><span class=\"kc\">True</span>\n    <span class=\"p\">)</span>\n    value <span class=\"o\">=</span> models<span class=\"o\">.</span>IntegerField<span class=\"p\">()</span>\n</code></pre></div>\n<p>This bug will be fixed in the next release of Django.</p>\n</section>\n<section id=\"caveats-with-support-of-certain-databases\">\n<h3>Caveats with support of certain databases<a class=\"heading-anchor\" href=\"#caveats-with-support-of-certain-databases\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Django attempts to support as many features as possible on all database\nbackends. However, not all database backends are alike, and in particular many\nof the supported database differ greatly from version to version. It’s a good\nidea to checkout our <a class=\"reference internal\" href=\"/en/dev/ref/databases/\"><span class=\"doc\">notes on supported database</span></a>:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"/en/dev/ref/databases/#mysql-notes\"><span class=\"std std-ref\">MySQL notes</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"/en/dev/ref/databases/#sqlite-notes\"><span class=\"std std-ref\">SQLite notes</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"/en/dev/ref/databases/#oracle-notes\"><span class=\"std std-ref\">Oracle notes</span></a></p></li>\n</ul>\n</section>\n</section>","rootId":"django-1-0-release-notes","toc":[{"title":"Stability and forwards-compatibility","anchor":"stability-and-forwards-compatibility","children":[]},{"title":"Backwards-incompatible changes","anchor":"backwards-incompatible-changes","children":[]},{"title":"What’s new in Django 1.0","anchor":"what-s-new-in-django-1-0","children":[{"title":"Refactored admin application","anchor":"refactored-admin-application","children":[]},{"title":"Improved Unicode handling","anchor":"improved-unicode-handling","children":[]},{"title":"An improved ORM","anchor":"an-improved-orm","children":[]},{"title":"Automatic escaping of template variables","anchor":"automatic-escaping-of-template-variables","children":[]},{"title":"django.contrib.gis (GeoDjango)","anchor":"django-contrib-gis-geodjango","children":[]},{"title":"Pluggable file storage","anchor":"pluggable-file-storage","children":[]},{"title":"Jython compatibility","anchor":"jython-compatibility","children":[]},{"title":"Generic relations in forms and admin","anchor":"generic-relations-in-forms-and-admin","children":[]},{"title":"INSERT/UPDATE distinction","anchor":"insert-update-distinction","children":[]},{"title":"Split CacheMiddleware","anchor":"split-cachemiddleware","children":[]},{"title":"Refactored django.contrib.comments","anchor":"refactored-django-contrib-comments","children":[]},{"title":"Removal of deprecated features","anchor":"removal-of-deprecated-features","children":[]}]},{"title":"Known issues","anchor":"known-issues","children":[{"title":"Multi-table model inheritance with to_field","anchor":"multi-table-model-inheritance-with-to-field","children":[]},{"title":"Caveats with support of certain databases","anchor":"caveats-with-support-of-certain-databases","children":[]}]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/1.0.1","title":"Django 1.0.1 release notes","url":"/en/dev/releases/1.0.1/"},"next":{"docname":"releases/1.0-porting-guide","title":"Porting your apps from Django 0.96 to 1.0","url":"/en/dev/releases/1.0-porting-guide/"},"formats":{"html":"/en/dev/releases/1.0/","markdown":"/en/dev/releases/1.0.md","json":"/en/dev/releases/1.0.json"},"source":"https://github.com/django/django/blob/main/docs/releases/1.0.txt","official":"https://docs.djangoproject.com/en/dev/releases/1.0/","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"]}