diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-07-15 18:40:21 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-07-15 18:40:21 +0000 |
| commit | dc2933f73b4a970d6b37241b6f185bbbacd1bb69 (patch) | |
| tree | 0ba347865c6bce0ccc33710cae213575613fd2be /docs/db-api.txt | |
| parent | 7b47dcd7734fc8d3d4c96bc15f21833716ca82eb (diff) | |
Fixed #3 -- Made OneToOneField act like ForeignKey and ManyToManyField. This is the last big API change before the official launch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@59 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/db-api.txt')
| -rw-r--r-- | docs/db-api.txt | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt index 2a41e9b373..f96b3ebca8 100644 --- a/docs/db-api.txt +++ b/docs/db-api.txt @@ -141,8 +141,7 @@ method. For example:: class Restaurant(meta.Model): ... fields = ( - meta.IntegerField('id', 'ID', primary_key=True, - rel=meta.OneToOne(places.Place, 'place', 'id')), + meta.OneToOneField(places.Place), ... ) @@ -294,7 +293,7 @@ For example:: Changing objects ================ -Once you've retrieved an object from the database using any of the above +Once you've retrieved an object from the database using any of the above options, changing it is extremely easy. Make changes directly to the objects fields, then call the object's ``save()`` method:: |
