~ubuntu-branches/ubuntu/quantal/python-django/quantal

« back to all changes in this revision

Viewing changes to docs/ref/models/relations.txt

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2008-11-15 19:15:33 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081115191533-xbt1ut2xf4fvwtvc
Tags: 1.0.1-0ubuntu1
* New upstream release:
  - Bug fixes.

* The tests/ sub-directory appaers to have been dropped upstream, so pull
  our patch to workaround the tests and modify the rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
        >>> e = Entry.objects.get(id=234)
20
20
        >>> b.entry_set.add(e) # Associates Entry e with Blog b.
21
21
 
22
 
.. method:: QuerySet.create(**kwargs)`
 
22
.. method:: QuerySet.create(**kwargs)
23
23
 
24
24
    Creates a new object, saves it and puts it in the related object set.
25
25
    Returns the newly created object::
73
73
 
74
74
    Note this doesn't delete the related objects -- it just disassociates them.
75
75
 
76
 
    Just like ``remove()``, ``clear()`` is only available on ``ForeignKey``s
 
76
    Just like ``remove()``, ``clear()`` is only available on ``ForeignKey``\s
77
77
    where ``null=True``.