class Person(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField()
def __str__(self):
return self.name
class Restaurant(models.Model):
name = models.CharField(max_length=100)
adress = models.CharField(max_length=200)
def
class Person(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField()
def __str__(self):
return self.name
class Restaurant(models.Model):
name = models.CharField(max_length=100)
adress = models.CharField(max_length=200)
def
class Dish(models.Model):
resturant = models.ForeignKey(Resturant)
name = models.CharField(max_length=255)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
i did the django tutorial and to get a better grasp i decided to make a
webpage. with 2 sections
section 1
every day will let the user vote for a restaurant before 4pm
section 2
from the restaurant with more votes will display the menu of the
restaurant and each user can chose what they
4 matches
Mail list logo