Created
September 24, 2020 01:23
-
-
Save toxinu/67504abbff4a0eefda4152e65c94e4c0 to your computer and use it in GitHub Desktop.
blog/filtering-and-ordering-with-restless
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.db import models | |
| class Pizza(models.Model): | |
| name = models.CharField(max_length=100) | |
| price = models.FloatField() | |
| is_vegetarian = models.BooleanField(default=False) | |
| class Ingredient(models.Model): | |
| name = models.CharField(max_length=100) | |
| class PizzaIngredient(models.Model): | |
| pizza = models.ForeignKey('Pizza', related_name='ingredients') | |
| ingredient = models.ForeignKey('Ingredient') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment