mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
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
This commit is contained in:
parent
7b47dcd773
commit
dc2933f73b
2 changed files with 19 additions and 3 deletions
|
@ -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::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue