diff options
| author | Tim Graham <timograham@gmail.com> | 2015-01-26 15:39:52 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-01 21:02:40 -0500 |
| commit | c79faae761659d51d58782dbd2b8058fb4668cfa (patch) | |
| tree | a83649a302c53dd2d0ce9e0f50c4017b8b5da979 /docs/topics/db | |
| parent | 0e6091249295b0e06aff2b1b4411819f94a1c529 (diff) | |
Removed versionadded/changed notes for 1.7.
Diffstat (limited to 'docs/topics/db')
| -rw-r--r-- | docs/topics/db/managers.txt | 2 | ||||
| -rw-r--r-- | docs/topics/db/models.txt | 44 | ||||
| -rw-r--r-- | docs/topics/db/queries.txt | 6 | ||||
| -rw-r--r-- | docs/topics/db/sql.txt | 10 |
4 files changed, 3 insertions, 59 deletions
diff --git a/docs/topics/db/managers.txt b/docs/topics/db/managers.txt index 3c0c3f3fb8..64d484e85d 100644 --- a/docs/topics/db/managers.txt +++ b/docs/topics/db/managers.txt @@ -242,8 +242,6 @@ the manager ``Person.people``. Creating ``Manager`` with ``QuerySet`` methods ---------------------------------------------- -.. versionadded:: 1.7 - In lieu of the above approach which requires duplicating methods on both the ``QuerySet`` and the ``Manager``, :meth:`QuerySet.as_manager() <django.db.models.query.QuerySet.as_manager>` can be used to create an instance diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt index 754cdce13d..9decc9ebef 100644 --- a/docs/topics/db/models.txt +++ b/docs/topics/db/models.txt @@ -477,12 +477,6 @@ There are a few restrictions on the intermediate model: :attr:`symmetrical=False <ManyToManyField.symmetrical>` (see :ref:`the model field reference <manytomany-arguments>`). -.. versionchanged:: 1.7 - - In Django 1.6 and earlier, intermediate models containing more than one - foreign key to any of the models involved in the many-to-many relationship - used to be prohibited. - Now that you have set up your :class:`~django.db.models.ManyToManyField` to use your intermediary model (``Membership``, in this case), you're ready to start creating some many-to-many relationships. You do this by creating instances of @@ -1303,41 +1297,9 @@ inheritance hierarchies as simple and straightforward as possible so that you won't have to struggle to work out where a particular piece of information is coming from. -.. versionchanged:: 1.7 - -Before Django 1.7, inheriting from multiple models that had an ``id`` primary -key field did not raise an error, but could result in data loss. For example, -consider these models (which no longer validate due to the clashing ``id`` -fields):: - - class Article(models.Model): - headline = models.CharField(max_length=50) - body = models.TextField() - - class Book(models.Model): - title = models.CharField(max_length=50) - - class BookReview(Book, Article): - pass - -This snippet demonstrates how creating a child object overwrote the value of a -previously created parent object:: - - >>> article = Article.objects.create(headline='Some piece of news.') - >>> review = BookReview.objects.create( - ... headline='Review of Little Red Riding Hood.', - ... title='Little Red Riding Hood') - >>> - >>> assert Article.objects.get(pk=article.pk).headline == article.headline - Traceback (most recent call last): - File "<console>", line 1, in <module> - AssertionError - >>> # the "Some piece of news." headline has been overwritten. - >>> Article.objects.get(pk=article.pk).headline - 'Review of Little Red Riding Hood.' - -To properly use multiple inheritance, you can use an explicit -:class:`~django.db.models.AutoField` in the base models:: +Note that inheriting from multiple models that have a common ``id`` primary +key field will raise an error. To properly use multiple inheritance, you can +use an explicit :class:`~django.db.models.AutoField` in the base models:: class Article(models.Model): article_id = models.AutoField(primary_key=True) diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index 7aff43e9c7..c616d02b33 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -618,10 +618,6 @@ and with other ``F()`` objects. To find all the blog entries with more than >>> Entry.objects.filter(n_comments__gt=F('n_pingbacks') * 2) -.. versionadded:: 1.7 - - The power operator ``**`` was added. - To find all the entries where the rating of the entry is less than the sum of the pingback count and comment count, we would issue the query:: @@ -1149,8 +1145,6 @@ above example code would look like this:: Using a custom reverse manager ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 1.7 - By default the :class:`~django.db.models.fields.related.RelatedManager` used for reverse relations is a subclass of the :ref:`default manager <manager-names>` for that model. If you would like to specify a different manager for a given diff --git a/docs/topics/db/sql.txt b/docs/topics/db/sql.txt index a759ff50a7..0c382e811d 100644 --- a/docs/topics/db/sql.txt +++ b/docs/topics/db/sql.txt @@ -314,16 +314,6 @@ Also note that Django expects the ``"%s"`` placeholder, *not* the ``"?"`` placeholder, which is used by the SQLite Python bindings. This is for the sake of consistency and sanity. -.. versionchanged:: 1.7 - -:pep:`249` does not state whether a cursor should be usable as a context -manager. Prior to Python 2.7, a cursor was usable as a context manager due -an unexpected behavior in magic method lookups (`Python ticket #9220`_). -Django 1.7 explicitly added support to allow using a cursor as context -manager. - -.. _`Python ticket #9220`: https://bugs.python.org/issue9220 - Using a cursor as a context manager:: with connection.cursor() as c: |
