Ticket #13562: values-reverse-one-to-one__test-only.diff
| File values-reverse-one-to-one__test-only.diff, 1008 bytes (added by , 16 years ago) |
|---|
-
tests/modeltests/one_to_one/models.py
16 16 return u"%s the place" % self.name 17 17 18 18 class Restaurant(models.Model): 19 place = models.OneToOneField(Place, primary_key=True )19 place = models.OneToOneField(Place, primary_key=True) 20 20 serves_hot_dogs = models.BooleanField() 21 21 serves_pizza = models.BooleanField() 22 22 … … 91 91 >>> r.place 92 92 <Place: Demon Dogs the place> 93 93 94 95 96 97 98 94 99 # Restaurant.objects.all() just returns the Restaurants, not the Places. 95 100 # Note that there are two restaurants - Ace Hardware the Restaurant was created 96 101 # in the call to r.place = p2.