Changes between Initial Version and Version 1 of Ticket #13538


Ignore:
Timestamp:
May 14, 2010, 9:00:06 AM (14 years ago)
Author:
Karen Tracey
Comment:

(Fixed description formatting. Please use preview.)

The text in question is here: http://docs.djangoproject.com/en/dev/topics/db/queries/#saving-foreignkey-and-manytomanyfield-fields

The Entry/entry difference is not an error in the documentation. The lowercase-e entry is assumed to be an instance of the Entry class. The previous section on saving changes to an object makes that clear by noting what b5 is before using it in the example code, it would probably make sense to avoid confusion and note something similar before entry is used.

The page does show an import for Blog, but not the other models used. In reading through the text, though, it's clear that the Blog import is done to show an example of how to do it; the remaining text assumes corresponding imports have been done for the other models used. It might not hurt to point that out in the text.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13538

    • Property Triage Stage UnreviewedAccepted
    • Property Summary Mistakes in http://docs.djangoproject.com/en/dev/topics/db/queries/Clarificications for http://docs.djangoproject.com/en/dev/topics/db/queries/
  • Ticket #13538 – Description

    initial v1  
    22class Entry(models.Model)
    33
    4 But under "Saving ForeignKey  and ManyToManyField  fields",
     4But under "Saving !ForeignKey  and !ManyToManyField  fields",
    55a small E is used...
     6{{{
    67>>> entry.blog = cheese_blog
    78>>> entry.save()
     9}}}
     10Before the above line can be executed, there is also a missing import statement...
     11{{{
     12>>> from mysite.blog.models import *
     13}}}
    814
    9 Before the above line can be executed, there is also a missing import statement...
    10 >>> from mysite.blog.models import *
    11 
    12 
Back to Top