Loading docs/releases/1.7.txt +1 −1 Original line number Diff line number Diff line Loading @@ -185,7 +185,7 @@ class method can now directly :ref:`create Manager with QuerySet methods class Food(models.Model): kind = models.CharField(max_length=50) vegetarian = models.BooleanField() vegetarian = models.BooleanField(default=False) objects = FoodQuerySet.as_manager() Food.objects.pizzas().vegetarian() Loading docs/topics/db/examples/one_to_one.txt +2 −2 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ In this example, a ``Place`` optionally can be a ``Restaurant``: class Restaurant(models.Model): place = models.OneToOneField(Place, primary_key=True) serves_hot_dogs = models.BooleanField() serves_pizza = models.BooleanField() serves_hot_dogs = models.BooleanField(default=False) serves_pizza = models.BooleanField(default=False) def __str__(self): # __unicode__ on Python 2 return "%s the restaurant" % self.place.name Loading docs/topics/db/models.txt +2 −2 Original line number Diff line number Diff line Loading @@ -1006,8 +1006,8 @@ For example:: address = models.CharField(max_length=80) class Restaurant(Place): serves_hot_dogs = models.BooleanField() serves_pizza = models.BooleanField() serves_hot_dogs = models.BooleanField(default=False) serves_pizza = models.BooleanField(default=False) All of the fields of ``Place`` will also be available in ``Restaurant``, although the data will reside in a different database table. So these are both Loading docs/topics/serialization.txt +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ model will be serialized. For example, consider the following models:: name = models.CharField(max_length=50) class Restaurant(Place): serves_hot_dogs = models.BooleanField() serves_hot_dogs = models.BooleanField(default=False) If you only serialize the Restaurant model:: Loading Loading
docs/releases/1.7.txt +1 −1 Original line number Diff line number Diff line Loading @@ -185,7 +185,7 @@ class method can now directly :ref:`create Manager with QuerySet methods class Food(models.Model): kind = models.CharField(max_length=50) vegetarian = models.BooleanField() vegetarian = models.BooleanField(default=False) objects = FoodQuerySet.as_manager() Food.objects.pizzas().vegetarian() Loading
docs/topics/db/examples/one_to_one.txt +2 −2 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ In this example, a ``Place`` optionally can be a ``Restaurant``: class Restaurant(models.Model): place = models.OneToOneField(Place, primary_key=True) serves_hot_dogs = models.BooleanField() serves_pizza = models.BooleanField() serves_hot_dogs = models.BooleanField(default=False) serves_pizza = models.BooleanField(default=False) def __str__(self): # __unicode__ on Python 2 return "%s the restaurant" % self.place.name Loading
docs/topics/db/models.txt +2 −2 Original line number Diff line number Diff line Loading @@ -1006,8 +1006,8 @@ For example:: address = models.CharField(max_length=80) class Restaurant(Place): serves_hot_dogs = models.BooleanField() serves_pizza = models.BooleanField() serves_hot_dogs = models.BooleanField(default=False) serves_pizza = models.BooleanField(default=False) All of the fields of ``Place`` will also be available in ``Restaurant``, although the data will reside in a different database table. So these are both Loading
docs/topics/serialization.txt +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ model will be serialized. For example, consider the following models:: name = models.CharField(max_length=50) class Restaurant(Place): serves_hot_dogs = models.BooleanField() serves_hot_dogs = models.BooleanField(default=False) If you only serialize the Restaurant model:: Loading