[Python-modules-commits] [python-django] 01/09: Import python-django_1.8.14.orig.tar.gz

Raphaël Hertzog hertzog at moszumanska.debian.org
Thu Jul 21 08:48:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

hertzog pushed a commit to branch debian/jessie-backports
in repository python-django.

commit bda91e2a79160524c26fb87ca05f73b0132f5e0c
Author: Raphaël Hertzog <hertzog at debian.org>
Date:   Thu Jul 21 08:58:59 2016 +0200

    Import python-django_1.8.14.orig.tar.gz
---
 Django.egg-info/PKG-INFO                           |  2 +-
 Django.egg-info/SOURCES.txt                        |  2 +-
 PKG-INFO                                           |  2 +-
 django/__init__.py                                 |  2 +-
 .../static/admin/js/admin/RelatedObjectLookups.js  |  2 +-
 django/contrib/gis/db/backends/base/models.py      |  8 ++---
 django/contrib/gis/db/models/sql/aggregates.py     | 10 ------
 django/contrib/gis/templates/gis/openlayers.html   |  4 +--
 django/db/backends/postgresql_psycopg2/schema.py   |  6 ++++
 django/template/defaulttags.py                     |  8 ++---
 django/views/debug.py                              |  4 +--
 docs/conf.py                                       |  3 ++
 docs/howto/custom-lookups.txt                      |  2 +-
 docs/ref/contrib/gis/admin.txt                     |  2 +-
 docs/ref/models/meta.txt                           |  6 ++--
 docs/ref/models/querysets.txt                      |  2 +-
 docs/ref/request-response.txt                      |  2 +-
 docs/releases/1.0.txt                              |  2 +-
 docs/releases/1.1.txt                              |  9 +++--
 docs/releases/1.2.txt                              | 20 ++++++------
 docs/releases/1.3.txt                              | 28 +++++-----------
 docs/releases/1.4.txt                              | 24 +++++++-------
 docs/releases/1.5.txt                              | 24 +++++++-------
 docs/releases/1.6.txt                              | 19 ++++++-----
 docs/releases/1.7.txt                              | 22 ++++++-------
 docs/releases/1.8.14.txt                           | 25 ++++++++++++++
 docs/releases/1.8.txt                              | 22 ++++++-------
 docs/releases/index.txt                            |  1 +
 docs/topics/class-based-views/generic-display.txt  |  2 +-
 docs/topics/db/aggregation.txt                     |  1 +
 docs/topics/forms/modelforms.txt                   |  2 +-
 docs/topics/http/file-uploads.txt                  |  6 ++--
 docs/topics/http/middleware.txt                    |  2 +-
 docs/topics/http/sessions.txt                      |  9 -----
 tests/admin_views/admin.py                         |  3 +-
 tests/admin_views/models.py                        |  4 +++
 tests/admin_views/tests.py                         | 38 ++++++++++++++++++++++
 tests/gis_tests/test_geoip.py                      |  2 +-
 tests/i18n/test_extraction.py                      |  2 +-
 tests/schema/tests.py                              | 27 +++++++++++++++
 tests/servers/tests.py                             | 14 +++-----
 tests/template_tests/syntax_tests/test_numpy.py    | 14 ++++----
 42 files changed, 232 insertions(+), 157 deletions(-)

diff --git a/Django.egg-info/PKG-INFO b/Django.egg-info/PKG-INFO
index 231f546..73bedcf 100644
--- a/Django.egg-info/PKG-INFO
+++ b/Django.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Django
-Version: 1.8.13
+Version: 1.8.14
 Summary: A high-level Python Web framework that encourages rapid development and clean, pragmatic design.
 Home-page: http://www.djangoproject.com/
 Author: Django Software Foundation
diff --git a/Django.egg-info/SOURCES.txt b/Django.egg-info/SOURCES.txt
index 1bfc127..c152a2e 100644
--- a/Django.egg-info/SOURCES.txt
+++ b/Django.egg-info/SOURCES.txt
@@ -1630,7 +1630,6 @@ django/contrib/gis/db/models/manager.py
 django/contrib/gis/db/models/proxy.py
 django/contrib/gis/db/models/query.py
 django/contrib/gis/db/models/sql/__init__.py
-django/contrib/gis/db/models/sql/aggregates.py
 django/contrib/gis/db/models/sql/conversion.py
 django/contrib/gis/forms/__init__.py
 django/contrib/gis/forms/fields.py
@@ -3406,6 +3405,7 @@ docs/releases/1.8.10.txt
 docs/releases/1.8.11.txt
 docs/releases/1.8.12.txt
 docs/releases/1.8.13.txt
+docs/releases/1.8.14.txt
 docs/releases/1.8.2.txt
 docs/releases/1.8.3.txt
 docs/releases/1.8.4.txt
diff --git a/PKG-INFO b/PKG-INFO
index 231f546..73bedcf 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Django
-Version: 1.8.13
+Version: 1.8.14
 Summary: A high-level Python Web framework that encourages rapid development and clean, pragmatic design.
 Home-page: http://www.djangoproject.com/
 Author: Django Software Foundation
diff --git a/django/__init__.py b/django/__init__.py
index 1e77d41..f92ff55 100644
--- a/django/__init__.py
+++ b/django/__init__.py
@@ -1,6 +1,6 @@
 from django.utils.version import get_version
 
-VERSION = (1, 8, 13, 'final', 0)
+VERSION = (1, 8, 14, 'final', 0)
 
 __version__ = get_version(VERSION)
 
diff --git a/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js b/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
index d358b20..17ff10f 100644
--- a/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
+++ b/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
@@ -105,7 +105,7 @@ function dismissChangeRelatedObjectPopup(win, objId, newRepr, newId) {
     var selects = django.jQuery(selectsSelector);
     selects.find('option').each(function() {
         if (this.value == objId) {
-            this.innerHTML = newRepr;
+            this.textContent = newRepr;
             this.value = newId;
         }
     });
diff --git a/django/contrib/gis/db/backends/base/models.py b/django/contrib/gis/db/backends/base/models.py
index a84b23d..7367a9f 100644
--- a/django/contrib/gis/db/backends/base/models.py
+++ b/django/contrib/gis/db/backends/base/models.py
@@ -45,14 +45,14 @@ class SpatialRefSysMixin(object):
                 try:
                     self._srs = gdal.SpatialReference(self.wkt)
                     return self.srs
-                except Exception as msg:
-                    pass
+                except Exception as e:
+                    msg = e
 
                 try:
                     self._srs = gdal.SpatialReference(self.proj4text)
                     return self.srs
-                except Exception as msg:
-                    pass
+                except Exception as e:
+                    msg = e
 
                 raise Exception('Could not get OSR SpatialReference from WKT: %s\nError:\n%s' % (self.wkt, msg))
         else:
diff --git a/django/contrib/gis/db/models/sql/aggregates.py b/django/contrib/gis/db/models/sql/aggregates.py
deleted file mode 100644
index e3fb049..0000000
--- a/django/contrib/gis/db/models/sql/aggregates.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from django.db.models.sql import aggregates
-from django.db.models.sql.aggregates import *  # NOQA
-
-__all__ = ['Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union'] + aggregates.__all__
-
-
-warnings.warn(
-    "django.contrib.gis.db.models.sql.aggregates is deprecated. Use "
-    "django.contrib.gis.db.models.aggregates instead.",
-    RemovedInDjango110Warning, stacklevel=2)
diff --git a/django/contrib/gis/templates/gis/openlayers.html b/django/contrib/gis/templates/gis/openlayers.html
index 0356a9d..3c2d607 100644
--- a/django/contrib/gis/templates/gis/openlayers.html
+++ b/django/contrib/gis/templates/gis/openlayers.html
@@ -5,11 +5,11 @@
     #{{ id }}_div_map { position: relative; vertical-align: top; float: {{ LANGUAGE_BIDI|yesno:"right,left" }}; }
     {% if not display_raw %}#{{ id }} { display: none; }{% endif %}
     .olControlEditingToolbar .olControlModifyFeatureItemActive {
-        background-image: url("{% static "admin/img/gis/move_vertex_on.png" %});
+        background-image: url("{% static "admin/img/gis/move_vertex_on.png" %}");
         background-repeat: no-repeat;
     }
     .olControlEditingToolbar .olControlModifyFeatureItemInactive {
-        background-image: url("{% static "admin/img/gis/move_vertex_off.png" %});
+        background-image: url("{% static "admin/img/gis/move_vertex_off.png" %}");
         background-repeat: no-repeat;
     }{% endblock %}
 </style>
diff --git a/django/db/backends/postgresql_psycopg2/schema.py b/django/db/backends/postgresql_psycopg2/schema.py
index 884ac44..e3b642b 100644
--- a/django/db/backends/postgresql_psycopg2/schema.py
+++ b/django/db/backends/postgresql_psycopg2/schema.py
@@ -14,6 +14,12 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
     def quote_value(self, value):
         return psycopg2.extensions.adapt(value)
 
+    def add_field(self, model, field):
+        super(DatabaseSchemaEditor, self).add_field(model, field)
+        like_index_statement = self._create_like_index_sql(model, field)
+        if like_index_statement is not None:
+            self.deferred_sql.append(like_index_statement)
+
     def _model_indexes_sql(self, model):
         output = super(DatabaseSchemaEditor, self)._model_indexes_sql(model)
         if not model._meta.managed or model._meta.proxy or model._meta.swapped:
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index 4526737..a36cd31 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -745,7 +745,7 @@ def do_filter(parser, token):
 @register.tag
 def firstof(parser, token):
     """
-    Outputs the first variable passed that is not False, without escaping.
+    Outputs the first variable passed that is not False.
 
     Outputs nothing if all the passed variables are False.
 
@@ -756,11 +756,11 @@ def firstof(parser, token):
     This is equivalent to::
 
         {% if var1 %}
-            {{ var1|safe }}
+            {{ var1 }}
         {% elif var2 %}
-            {{ var2|safe }}
+            {{ var2 }}
         {% elif var3 %}
-            {{ var3|safe }}
+            {{ var3 }}
         {% endif %}
 
     but obviously much cleaner!
diff --git a/django/views/debug.py b/django/views/debug.py
index f352196..9984f38 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -704,13 +704,13 @@ TECHNICAL_500_TEMPLATE = ("""
       var s = link.getElementsByTagName('span')[0];
       var uarr = String.fromCharCode(0x25b6);
       var darr = String.fromCharCode(0x25bc);
-      s.innerHTML = s.innerHTML == uarr ? darr : uarr;
+      s.textContent = s.textContent == uarr ? darr : uarr;
       return false;
     }
     function switchPastebinFriendly(link) {
       s1 = "Switch to copy-and-paste view";
       s2 = "Switch back to interactive view";
-      link.innerHTML = link.innerHTML.trim() == s1 ? s2: s1;
+      link.textContent = link.textContent.trim() == s1 ? s2: s1;
       toggle('browserTraceback', 'pastebinTraceback');
       return false;
     }
diff --git a/docs/conf.py b/docs/conf.py
index 1176f8d..557ccfd 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -145,6 +145,9 @@ intersphinx_mapping = {
 # Python's docs don't change every week.
 intersphinx_cache_limit = 90  # days
 
+# The 'versionadded' and 'versionchanged' directives are overridden.
+suppress_warnings = ['app.add_directive']
+
 # -- Options for HTML output ---------------------------------------------------
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
diff --git a/docs/howto/custom-lookups.txt b/docs/howto/custom-lookups.txt
index 1878a65..144bd7c 100644
--- a/docs/howto/custom-lookups.txt
+++ b/docs/howto/custom-lookups.txt
@@ -307,7 +307,7 @@ would override ``get_lookup`` with something like::
                     dimension = int(lookup_name[1:])
                 except ValueError:
                     pass
-                finally:
+                else:
                     return get_coordinate_lookup(dimension)
             return super(CoordinatesField, self).get_lookup(lookup_name)
 
diff --git a/docs/ref/contrib/gis/admin.txt b/docs/ref/contrib/gis/admin.txt
index b91a215..3a40a46 100644
--- a/docs/ref/contrib/gis/admin.txt
+++ b/docs/ref/contrib/gis/admin.txt
@@ -20,7 +20,7 @@ GeoDjango's admin site
 
    .. attribute:: default_zoom
 
-   The default zoom level to use.  Defaults to 18.
+   The default zoom level to use.  Defaults to 4.
 
    .. attribute:: extra_js
 
diff --git a/docs/ref/models/meta.txt b/docs/ref/models/meta.txt
index d8f711b..fa4956c 100644
--- a/docs/ref/models/meta.txt
+++ b/docs/ref/models/meta.txt
@@ -240,7 +240,8 @@ can be made to convert your code to the new API:
 
       [
           f for f in MyModel._meta.get_fields()
-          if (f.one_to_many or f.one_to_one) and f.auto_created
+          if (f.one_to_many or f.one_to_one)
+          and f.auto_created and not f.concrete
       ]
 
 * ``MyModel._meta.get_all_related_objects_with_model()``::
@@ -248,7 +249,8 @@ can be made to convert your code to the new API:
       [
           (f, f.model if f.model != MyModel else None)
           for f in MyModel._meta.get_fields()
-          if (f.one_to_many or f.one_to_one) and f.auto_created
+          if (f.one_to_many or f.one_to_one)
+          and f.auto_created and not f.concrete
       ]
 
 * ``MyModel._meta.get_all_related_many_to_many_objects()``::
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index b0ea478..0eee8fc 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -977,7 +977,7 @@ You can also use the normal join syntax to do related fields of related
 fields. Suppose we have an additional model to the example above::
 
     class Restaurant(models.Model):
-        pizzas = models.ManyToMany(Pizza, related_name='restaurants')
+        pizzas = models.ManyToManyField(Pizza, related_name='restaurants')
         best_pizza = models.ForeignKey(Pizza, related_name='championed_by')
 
 The following are all legal:
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index 4030c57..30b2346 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -449,7 +449,7 @@ a subclass of dictionary. Exceptions are outlined here:
         >>> q.getlist('a')
         ['1', '2']
         >>> q['a'] # returns the last
-        ['2']
+        '2'
 
 .. method:: QueryDict.items()
 
diff --git a/docs/releases/1.0.txt b/docs/releases/1.0.txt
index 162caaa..7cd0749 100644
--- a/docs/releases/1.0.txt
+++ b/docs/releases/1.0.txt
@@ -22,7 +22,7 @@ contributions overtake those made privately.
 Stability and forwards-compatibility
 ====================================
 
-:doc:`The release of Django 1.0 </releases/1.0>` comes with a promise of API
+The release of Django 1.0 comes with a promise of API
 stability and forwards-compatibility. In a nutshell, this means that code you
 develop against Django 1.0 will continue to work against 1.1 unchanged, and you
 should need to make only minor changes for any 1.X release.
diff --git a/docs/releases/1.1.txt b/docs/releases/1.1.txt
index 3821261..f824dc0 100644
--- a/docs/releases/1.1.txt
+++ b/docs/releases/1.1.txt
@@ -2,15 +2,12 @@
 Django 1.1 release notes
 ========================
 
-
 July 29, 2009
 
 Welcome to Django 1.1!
 
-Django 1.1 includes a number of nifty `new features`_, lots of bug
-fixes, and an easy upgrade path from Django 1.0.
-
-.. _new features: `What's new in Django 1.1`_
+Django 1.1 includes a number of nifty :ref:`new features <whats-new-1.1>`, lots
+of bug fixes, and an easy upgrade path from Django 1.0.
 
 .. _backwards-incompatible-changes-1.1:
 
@@ -175,6 +172,8 @@ be upgraded to a ``DeprecationWarning``, which will be displayed loudly. Django
 For more details on our deprecation policies and strategy, see
 :doc:`/internals/release-process`.
 
+.. _whats-new-1.1:
+
 What's new in Django 1.1
 ========================
 
diff --git a/docs/releases/1.2.txt b/docs/releases/1.2.txt
index 368c436..2de5e06 100644
--- a/docs/releases/1.2.txt
+++ b/docs/releases/1.2.txt
@@ -6,12 +6,10 @@ Django 1.2 release notes
 
 Welcome to Django 1.2!
 
-Nearly a year in the making, Django 1.2 packs an impressive list of `new
-features`_ and lots of bug fixes. These release notes cover the new features,
-as well as important changes you'll want to be aware of when upgrading from
-Django 1.1 or older versions.
-
-.. _new features: `What's new in Django 1.2`_
+Nearly a year in the making, Django 1.2 packs an impressive list of :ref:`new
+features <whats-new-1.2>` and lots of bug fixes. These release notes cover
+the new features, as well as important changes you'll want to be aware of when
+upgrading from Django 1.1 or older versions.
 
 Overview
 ========
@@ -115,6 +113,8 @@ A roadmap for Django's overall 2.x Python support, and eventual
 transition to Python 3.x, is currently being developed, and will be
 announced prior to the release of Django 1.3.
 
+.. _whats-new-1.2:
+
 What's new in Django 1.2
 ========================
 
@@ -1073,10 +1073,10 @@ to provide localizers the possibility to translate date and time formats. They
 were translatable :term:`translation strings <translation string>` that could
 be recognized because they were all upper case (for example
 :setting:`DATETIME_FORMAT`, :setting:`DATE_FORMAT`, :setting:`TIME_FORMAT`).
-They have been deprecated in favor of the new :ref:`Format localization
-<format-localization>` infrastructure that allows localizers to specify that
-information in a ``formats.py`` file in the corresponding
-``django/conf/locale/<locale name>/`` directory.
+They have been deprecated in favor of the new :doc:`/topics/i18n/formatting`
+infrastructure that allows localizers to specify that information in a
+``formats.py`` file in the corresponding ``django/conf/locale/<locale name>/``
+directory.
 
 GeoDjango
 ---------
diff --git a/docs/releases/1.3.txt b/docs/releases/1.3.txt
index c8720e8..ef69665 100644
--- a/docs/releases/1.3.txt
+++ b/docs/releases/1.3.txt
@@ -6,11 +6,11 @@ Django 1.3 release notes
 
 Welcome to Django 1.3!
 
-Nearly a year in the making, Django 1.3 includes quite a few `new
-features`_ and plenty of bug fixes and improvements to existing
-features. These release notes cover the new features in 1.3, as well
-as some `backwards-incompatible changes`_ you'll want to be aware of
-when upgrading from Django 1.2 or older versions.
+Nearly a year in the making, Django 1.3 includes quite a few :ref:`new features
+<whats-new-1.3>` and plenty of bug fixes and improvements to existing features.
+These release notes cover the new features in 1.3, as well as some
+:ref:`backwards-incompatible changes <backwards-incompatible-changes-1.3>`
+you'll want to be aware of when upgrading from Django 1.2 or older versions.
 
 Overview
 ========
@@ -28,27 +28,15 @@ new features from landing, including:
 * Django's testing framework now supports (and ships with a copy of)
   `the unittest2 library`_.
 
-There's plenty more, of course; see the coverage of `new features`_
-below for a full rundown and details.
-
 Wherever possible, of course, new features are introduced in a
 backwards-compatible manner per :doc:`our API stability policy
 </misc/api-stability>` policy. As a result of this policy, Django 1.3
-`begins the deprecation process for some features`_.
-
-Some changes, unfortunately, are genuinely backwards-incompatible; in
-most cases these are due to security issues or bugs which simply
-couldn't be fixed any other way. Django 1.3 includes a few of these,
-and descriptions of them -- along with the (minor) modifications
-you'll need to make to handle them -- are documented in the list of
-`backwards-incompatible changes`_ below.
+:ref:`begins the deprecation process for some features
+<deprecated-features-1.3>`.
 
-.. _new features: `What's new in Django 1.3`_
-.. _backwards-incompatible changes: backwards-incompatible-changes-1.3_
 .. _using Python's logging facilities: `Logging`_
 .. _easy handling of static files: `Extended static files handling`_
 .. _the unittest2 library: `unittest2 support`_
-.. _begins the deprecation process for some features: `deprecated-features-1.3`_
 
 Python compatibility
 ====================
@@ -64,6 +52,8 @@ supported Python version will be 2.5. A document outlining our full
 timeline for deprecating Python 2.x and moving to Python 3.x will be
 published shortly after the release of Django 1.3.
 
+.. _whats-new-1.3:
+
 What's new in Django 1.3
 ========================
 
diff --git a/docs/releases/1.4.txt b/docs/releases/1.4.txt
index 064f31e..95d62b1 100644
--- a/docs/releases/1.4.txt
+++ b/docs/releases/1.4.txt
@@ -6,16 +6,12 @@ Django 1.4 release notes
 
 Welcome to Django 1.4!
 
-These release notes cover the `new features`_, as well
-as some `backwards incompatible changes`_ you'll want to be aware of
-when upgrading from Django 1.3 or older versions. We've also dropped some
-features, which are detailed in :ref:`our deprecation plan
-<deprecation-removed-in-1.4>`, and we've `begun the deprecation process for
-some features`_.
-
-.. _`new features`: `What's new in Django 1.4`_
-.. _`backwards incompatible changes`: `Backwards incompatible changes in 1.4`_
-.. _`begun the deprecation process for some features`: `Features deprecated in 1.4`_
+These release notes cover the :ref:`new features <whats-new-1.4>`, as well as
+some :ref:`backwards incompatible changes <backwards-incompatible-1.4>` you'll
+want to be aware of when upgrading from Django 1.3 or older versions. We've
+also dropped some features, which are detailed in :ref:`our deprecation plan
+<deprecation-removed-in-1.4>`, and we've :ref:`begun the deprecation process
+for some features <deprecated-features-1.4>`.
 
 Overview
 ========
@@ -56,8 +52,8 @@ Other notable new features in Django 1.4 include:
 Wherever possible we try to introduce new features in a backwards-compatible
 manner per :doc:`our API stability policy </misc/api-stability>` policy.
 However, as with previous releases, Django 1.4 ships with some minor
-`backwards incompatible changes`_; people upgrading from previous versions
-of Django should read that list carefully.
+:ref:`backwards incompatible changes <backwards-incompatible-1.4>`; people
+upgrading from previous versions of Django should read that list carefully.
 
 Python compatibility
 ====================
@@ -77,6 +73,8 @@ Django does not support Python 3.x at this time. At some point before the
 release of Django 1.4, we plan to publish a document outlining our full
 timeline for deprecating Python 2.x and moving to Python 3.x.
 
+.. _whats-new-1.4:
+
 What's new in Django 1.4
 ========================
 
@@ -665,6 +663,8 @@ Django 1.4 also includes several smaller improvements worth noting:
   useful in tests that don't need to hit a database. See
   :ref:`testcase_hierarchy_diagram`.
 
+.. _backwards-incompatible-1.4:
+
 Backwards incompatible changes in 1.4
 =====================================
 
diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt
index 498fa68..6ff6066 100644
--- a/docs/releases/1.5.txt
+++ b/docs/releases/1.5.txt
@@ -6,16 +6,12 @@ Django 1.5 release notes
 
 Welcome to Django 1.5!
 
-These release notes cover the `new features`_, as well
-as some `backwards incompatible changes`_ you'll want to be aware of
-when upgrading from Django 1.4 or older versions. We've also dropped some
-features, which are detailed in :ref:`our deprecation plan
-<deprecation-removed-in-1.5>`, and we've `begun the deprecation process for
-some features`_.
-
-.. _`new features`: `What's new in Django 1.5`_
-.. _`backwards incompatible changes`: `Backwards incompatible changes in 1.5`_
-.. _`begun the deprecation process for some features`: `Features deprecated in 1.5`_
+These release notes cover the :ref:`new features <whats-new-1.5>`, as well as
+some :ref:`backwards incompatible changes <backwards-incompatible-1.5>` you'll
+want to be aware of when upgrading from Django 1.4 or older versions. We've
+also dropped some features, which are detailed in :ref:`our deprecation plan
+<deprecation-removed-in-1.5>`, and we've :ref:`begun the deprecation process
+for some features <deprecated-features-1.5>`.
 
 Overview
 ========
@@ -51,8 +47,8 @@ Other notable new features in Django 1.5 include:
 Wherever possible we try to introduce new features in a backwards-compatible
 manner per :doc:`our API stability policy </misc/api-stability>`.
 However, as with previous releases, Django 1.5 ships with some minor
-`backwards incompatible changes`_; people upgrading from previous versions
-of Django should read that list carefully.
+:ref:`backwards incompatible changes <backwards-incompatible-1.5>`; people
+upgrading from previous versions of Django should read that list carefully.
 
 One deprecated feature worth noting is the shift to "new-style" :ttag:`url` tag.
 Prior to Django 1.3, syntax like ``{% url myview %}`` was interpreted
@@ -118,6 +114,8 @@ to start porting now.
 We plan to offer first-class, production-ready support for Python 3 in our next
 release, Django 1.6.
 
+.. _whats-new-1.5:
+
 What's new in Django 1.5
 ========================
 
@@ -348,6 +346,8 @@ Django 1.5 also includes several smaller improvements worth noting:
 * The admin's list filters can now be customized per-request thanks to the new
   :meth:`django.contrib.admin.ModelAdmin.get_list_filter` method.
 
+.. _backwards-incompatible-1.5:
+
 Backwards incompatible changes in 1.5
 =====================================
 
diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt
index dddf47d..873584e 100644
--- a/docs/releases/1.6.txt
+++ b/docs/releases/1.6.txt
@@ -24,15 +24,12 @@
 
 Welcome to Django 1.6!
 
-These release notes cover the `new features`_, as well as some `backwards
-incompatible changes`_ you'll want to be aware of when upgrading from Django
-1.5 or older versions. We've also dropped some features, which are detailed in
-:ref:`our deprecation plan <deprecation-removed-in-1.6>`, and we've `begun the
-deprecation process for some features`_.
-
-.. _`new features`: `What's new in Django 1.6`_
-.. _`backwards incompatible changes`: `Backwards incompatible changes in 1.6`_
-.. _`begun the deprecation process for some features`: `Features deprecated in 1.6`_
+These release notes cover the :ref:`new features <whats-new-1.6>`, as well as
+some :ref:`backwards incompatible changes <backwards-incompatible-1.6>` you'll
+want to be aware of when upgrading from Django 1.5 or older versions. We've
+also dropped some features, which are detailed in :ref:`our deprecation plan
+<deprecation-removed-in-1.6>`, and we've :ref:`begun the deprecation process
+for some features <deprecated-features-1.6>`.
 
 Python compatibility
 ====================
@@ -46,6 +43,8 @@ with Django 1.7, the minimum supported Python version will be 2.7.
 
 Python 3.4 is not supported, but support will be added in Django 1.7.
 
+.. _whats-new-1.6:
+
 What's new in Django 1.6
 ========================
 
@@ -370,6 +369,8 @@ Minor features
   default value. Passwords :ref:`will be upgraded <password-upgrades>` to use
   the new iteration count as necessary.
 
+.. _backwards-incompatible-1.6:
+
 Backwards incompatible changes in 1.6
 =====================================
 
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index 63eef9e..7db465e 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -6,16 +6,12 @@ Django 1.7 release notes
 
 Welcome to Django 1.7!
 
-These release notes cover the `new features`_, as well as some `backwards
-incompatible changes`_ you'll want to be aware of when upgrading from Django
-1.6 or older versions. We've `begun the deprecation process for some features`_,
-and some features have reached the end of their deprecation process and
-`have been removed`_.
-
-.. _`new features`: `What's new in Django 1.7`_
-.. _`backwards incompatible changes`: `Backwards incompatible changes in 1.7`_
-.. _`begun the deprecation process for some features`: `Features deprecated in 1.7`_
-.. _`have been removed`: `Features removed in 1.7`_
+These release notes cover the :ref:`new features <whats-new-1.7>`, as well as
+some :ref:`backwards incompatible changes <backwards-incompatible-1.7>` you'll
+want to be aware of when upgrading from Django 1.6 or older versions. We've
+:ref:`begun the deprecation process for some features
+<deprecated-features-1.7>`, and some features have reached the end of their
+deprecation process and :ref:`have been removed <removed-features-1.7>`.
 
 Python compatibility
 ====================
@@ -33,6 +29,8 @@ Django 1.6 until you can upgrade your Python version. Per :doc:`our support
 policy </internals/release-process>`, Django 1.6 will continue to receive
 security support until the release of Django 1.8.
 
+.. _whats-new-1.7:
+
 What's new in Django 1.7
 ========================
 
@@ -944,6 +942,8 @@ Validators
 * :func:`~django.core.validators.validate_email` now accepts addresses with
   IPv6 literals, like ``example@[2001:db8::1]``, as specified in RFC 5321.
 
+.. _backwards-incompatible-1.7:
+
 Backwards incompatible changes in 1.7
 =====================================
 
@@ -1810,7 +1810,7 @@ Private APIs ``django.db.models.sql.where.WhereNode.make_atom()`` and
 ``django.db.models.sql.where.Constraint`` are deprecated in favor of the new
 :doc:`custom lookups API </ref/models/lookups>`.
 
-.. removed-features-1.7:
+.. _removed-features-1.7:
 
 Features removed in 1.7
 =======================
diff --git a/docs/releases/1.8.14.txt b/docs/releases/1.8.14.txt
new file mode 100644
index 0000000..31a304f
--- /dev/null
+++ b/docs/releases/1.8.14.txt
@@ -0,0 +1,25 @@
+===========================
+Django 1.8.14 release notes
+===========================
+
+*July 18, 2016*
+
+Django 1.8.14 fixes a security issue and a bug in 1.8.13.
+
+XSS in admin's add/change related popup
+=======================================
+
+Unsafe usage of JavaScript's ``Element.innerHTML`` could result in XSS in the
+admin's add/change related popup. ``Element.textContent`` is now used to
+prevent execution of the data.
+
+The debug view also used ``innerHTML``. Although a security issue wasn't
+identified there, out of an abundance of caution it's also updated to use
+``textContent``.
+
+Bugfixes
+========
+
+* Fixed missing ``varchar/text_pattern_ops`` index on ``CharField`` and
+  ``TextField`` respectively when using ``AddField`` on PostgreSQL
+  (:ticket:`26889`).
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index 803300e..7aba611 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -6,22 +6,18 @@ Django 1.8 release notes
 
 Welcome to Django 1.8!
 
-These release notes cover the `new features`_, as well as some `backwards
-incompatible changes`_ you'll want to be aware of when upgrading from Django
-1.7 or older versions. We've also `begun the deprecation process for some
-features`_, and some features have reached the end of their deprecation process
-and `have been removed`_.
+These release notes cover the :ref:`new features <whats-new-1.8>`, as well as
+some :ref:`backwards incompatible changes <backwards-incompatible-1.8>` you'll
+want to be aware of when upgrading from Django 1.7 or older versions. We've
+also :ref:`begun the deprecation process for some features
+<deprecated-features-1.8>`, and some features have reached the end of their
+deprecation process and :ref:`have been removed <removed-features-1.8>`.
 
 Django 1.8 has been designated as Django's second :ref:`"Long-Term Support"
 (LTS) <lts-releases>` release. It will receive security updates for at least
 three years after its release. Support for the previous LTS, Django 1.4, will
 end 6 months from the release date of Django 1.8.
 
-.. _`new features`: `What's new in Django 1.8`_
-.. _`backwards incompatible changes`: `Backwards incompatible changes in 1.8`_
-.. _`begun the deprecation process for some features`: `Features deprecated in 1.8`_
-.. _`have been removed`: `Features removed in 1.8`_
-
 Python compatibility
 ====================
 
@@ -33,6 +29,8 @@ Django 1.8 is the first release to support Python 3.5.
 Due to the end of upstream support for Python 3.2 in February 2016, we won't
 test Django 1.8.x on Python 3.2 after the end of 2016.
 
+.. _whats-new-1.8:
+
 What's new in Django 1.8
 ========================
 
@@ -662,6 +660,8 @@ Validators
 * :class:`~django.core.validators.URLValidator` now supports IPv6 addresses,
   unicode domains, and URLs containing authentication data.
 
+.. _backwards-incompatible-1.8:
+
 Backwards incompatible changes in 1.8
 =====================================
 
@@ -1724,7 +1724,7 @@ After switching to the new signature the router will also be called by the
 :class:`~django.db.migrations.operations.RunPython` and
 :class:`~django.db.migrations.operations.RunSQL` operations.
 
-.. removed-features-1.8:
+.. _removed-features-1.8:
 
 Features removed in 1.8
 =======================
diff --git a/docs/releases/index.txt b/docs/releases/index.txt
index 1a40bc4..070d815 100644
--- a/docs/releases/index.txt
+++ b/docs/releases/index.txt
@@ -25,6 +25,7 @@ versions of the documentation contain the release notes for any later releases.
 .. toctree::
    :maxdepth: 1
 
+   1.8.14
    1.8.13
    1.8.12
    1.8.11
diff --git a/docs/topics/class-based-views/generic-display.txt b/docs/topics/class-based-views/generic-display.txt
index e21f177..3248513 100644
--- a/docs/topics/class-based-views/generic-display.txt
+++ b/docs/topics/class-based-views/generic-display.txt
@@ -292,7 +292,7 @@ technique::
     class AcmeBookList(ListView):
 
         context_object_name = 'book_list'
-        queryset = Book.objects.filter(publisher__name='Acme Publishing')
+        queryset = Book.objects.filter(publisher__name='ACME Publishing')
         template_name = 'books/acme_list.html'
 
 Notice that along with a filtered ``queryset``, we're also using a custom
diff --git a/docs/topics/db/aggregation.txt b/docs/topics/db/aggregation.txt
index cdf7950..a3c75db 100644
--- a/docs/topics/db/aggregation.txt
+++ b/docs/topics/db/aggregation.txt
@@ -68,6 +68,7 @@ In a hurry? Here's how to do common aggregate queries, assuming the models above
     {'price__max': Decimal('81.20')}
 
     # Cost per page
+    >>> from django.db.models import F, FloatField, Sum
     >>> Book.objects.all().aggregate(
     ...    price_per_page=Sum(F('price')/F('pages'), output_field=FloatField()))
     {'price_per_page': 0.4470664529184653}
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
index a1162d8..22d2d48 100644
--- a/docs/topics/forms/modelforms.txt
+++ b/docs/topics/forms/modelforms.txt
@@ -645,7 +645,7 @@ This creates a form that behaves identically to ``ArticleForm``, except there's
 some extra validation and cleaning for the ``pub_date`` field.
 
 You can also subclass the parent's ``Meta`` inner class if you want to change
-the ``Meta.fields`` or ``Meta.excludes`` lists::
+the ``Meta.fields`` or ``Meta.exclude`` lists::
 
     >>> class RestrictedArticleForm(EnhancedArticleForm):
     ...     class Meta(ArticleForm.Meta):
diff --git a/docs/topics/http/file-uploads.txt b/docs/topics/http/file-uploads.txt
index f07c276..2c0715d 100644
--- a/docs/topics/http/file-uploads.txt
+++ b/docs/topics/http/file-uploads.txt
@@ -184,7 +184,7 @@ For instance, suppose you've written a ``ProgressBarUploadHandler`` that
 provides feedback on upload progress to some sort of AJAX widget. You'd add this
 handler to your upload handlers like this::
 
-    request.upload_handlers.insert(0, ProgressBarUploadHandler())
+    request.upload_handlers.insert(0, ProgressBarUploadHandler(request))
 
 You'd probably want to use ``list.insert()`` in this case (instead of
 ``append()``) because a progress bar handler would need to run *before* any
@@ -193,7 +193,7 @@ other handlers. Remember, the upload handlers are processed in order.
 If you want to replace the upload handlers completely, you can just assign a new
 list::
 
-   request.upload_handlers = [ProgressBarUploadHandler()]
+   request.upload_handlers = [ProgressBarUploadHandler(request)]
 
 .. note::
 
@@ -221,7 +221,7 @@ list::
 
         @csrf_exempt
         def upload_file_view(request):
-            request.upload_handlers.insert(0, ProgressBarUploadHandler())
+            request.upload_handlers.insert(0, ProgressBarUploadHandler(request))
             return _upload_file_view(request)
 
         @csrf_protect
diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt
index 1abcdb5..f6d092f 100644
--- a/docs/topics/http/middleware.txt
+++ b/docs/topics/http/middleware.txt
@@ -28,6 +28,7 @@ here's the default value created by :djadmin:`django-admin startproject
 <startproject>`::
 
     MIDDLEWARE_CLASSES = (
+        'django.middleware.security.SecurityMiddleware',
         'django.contrib.sessions.middleware.SessionMiddleware',
         'django.middleware.common.CommonMiddleware',
         'django.middleware.csrf.CsrfViewMiddleware',
@@ -35,7 +36,6 @@ here's the default value created by :djadmin:`django-admin startproject
         'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
         'django.contrib.messages.middleware.MessageMiddleware',
         'django.middleware.clickjacking.XFrameOptionsMiddleware',
-        'django.middleware.security.SecurityMiddleware',
     )
 
 A Django installation doesn't require any middleware —
diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt
index 167b76c..6df37b8 100644
--- a/docs/topics/http/sessions.txt
+++ b/docs/topics/http/sessions.txt
@@ -506,15 +506,6 @@ An API is available to manipulate session data outside of a view::
     >>> s['last_login']
     1376587691
 
-In order to mitigate session fixation attacks, sessions keys that don't exist
-are regenerated::
-
-    >>> from django.contrib.sessions.backends.db import SessionStore
-    >>> s = SessionStore(session_key='no-such-session-here')
-    >>> s.save()
-    >>> s.session_key
-    'ff882814010ccbc3c870523934fee5a2'
-
 If you're using the ``django.contrib.sessions.backends.db`` backend, each
 session is just a normal Django model. The ``Session`` model is defined in
 ``django/contrib/sessions/models.py``. Because it's a normal model, you can
diff --git a/tests/admin_views/admin.py b/tests/admin_views/admin.py
index 8a980f4..a5e33a1 100644
--- a/tests/admin_views/admin.py
+++ b/tests/admin_views/admin.py
@@ -88,7 +88,8 @@ class ChapterXtra1Admin(admin.ModelAdmin):
 
 class ArticleAdmin(admin.ModelAdmin):
     list_display = ('content', 'date', callable_year, 'model_year',
-                    'modeladmin_year', 'model_year_reversed')
+                    'modeladmin_year', 'model_year_reversed', 'section')
+    list_editable = ('section',)
     list_filter = ('date', 'section')
     view_on_site = False
     fieldsets = (
diff --git a/tests/admin_views/models.py b/tests/admin_views/models.py
index e5f6cc9..6fe6966 100644
--- a/tests/admin_views/models.py
+++ b/tests/admin_views/models.py
@@ -16,6 +16,7 @@ from django.db import models
 from django.utils.encoding import python_2_unicode_compatible
 
 
+ at python_2_unicode_compatible
 class Section(models.Model):
     """
     A simple section that links to articles, to test linking to related items
@@ -23,6 +24,9 @@ class Section(models.Model):
     """
     name = models.CharField(max_length=100)
 
+    def __str__(self):
+        return self.name
+
     @property
     def name_property(self):
         """
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 5b60368..11b23d0 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -4056,6 +4056,44 @@ class SeleniumAdminViewsFirefoxTests(AdminSeleniumWebDriverTestCase):
         self.assertEqual(Pizza.objects.count(), 1)
         self.assertEqual(Topping.objects.count(), 2)
 
+    def test_list_editable_popups(self):
+        """
+        list_editable foreign keys have add/change popups.
+        """
+        from selenium.webdriver.support.ui import Select
+        s1 = Section.objects.create(name='Test section')
+        Article.objects.create(
+            title='foo',
+            content='<p>Middle content</p>',
+            date=datetime.datetime(2008, 3, 18, 11, 54, 58),
+            section=s1,
+        )
+        self.admin_login(username='super', password='secret', login_url=reverse('admin:index'))
+        self.selenium.get(self.live_server_url + reverse('admin:admin_views_article_changelist'))
+        # Change popup
+        self.selenium.find_element_by_id('change_id_form-0-section').click()
+        self.wait_for_popup()
+        self.selenium.switch_to.window(self.selenium.window_handles[-1])
+        self.wait_for_text('#content h1', 'Change section')
+        name_input = self.selenium.find_element_by_id('id_name')
+        name_input.clear()
+        name_input.send_keys('<i>edited section</i>')
+        self.selenium.find_element_by_xpath('//input[@value="Save"]').click()
+        self.selenium.switch_to.window(self.selenium.window_handles[0])
+        select = Select(self.selenium.find_element_by_id('id_form-0-section'))
+        self.assertEqual(select.first_selected_option.text, '<i>edited section</i>')
+
+        # Add popup
+        self.selenium.find_element_by_id('add_id_form-0-section').click()
+        self.wait_for_popup()
+        self.selenium.switch_to.window(self.selenium.window_handles[-1])
+        self.wait_for_text('#content h1', 'Add section')
+        self.selenium.find_element_by_id('id_name').send_keys('new section')
+        self.selenium.find_element_by_xpath('//input[@value="Save"]').click()
+        self.selenium.switch_to.window(self.selenium.window_handles[0])
+        select = Select(self.selenium.find_element_by_id('id_form-0-section'))
+        self.assertEqual(select.first_selected_option.text, 'new section')
+
     def test_list_editable_raw_id_fields(self):
         parent = ParentWithUUIDPK.objects.create(title='test')
         parent2 = ParentWithUUIDPK.objects.create(title='test2')
diff --git a/tests/gis_tests/test_geoip.py b/tests/gis_tests/test_geoip.py
index 2fb6c2c..111620c 100644
--- a/tests/gis_tests/test_geoip.py
+++ b/tests/gis_tests/test_geoip.py
@@ -114,7 +114,7 @@ class GeoIPTest(unittest.TestCase):
         "Testing that GeoIP strings are properly encoded, see #16553."
         g = GeoIP()
         d = g.city("duesseldorf.de")
-        self.assertEqual('Düsseldorf', d['city'])
+        self.assertEqual('Ratingen', d['city'])
         d = g.country('200.26.205.1')
         # Some databases have only unaccented countries
         self.assertIn(d['country_name'], ('Curaçao', 'Curacao'))
... 117 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django.git



More information about the Python-modules-commits mailing list