class Recipe(models.Model):
title = models.CharField(max_length=200)
slug = models.SlugField(max_length=110)
ingredients = models.TextField()
instructions = models.TextField()
creator = models.ForeignKey(User)
food_type = models.ManyToManyField(FoodType)
created_on = models.DateTimeField(
auto_now_add=True, default=datetime.datetime.now)
class User(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
username = models.CharField(max_length=255, default='', unique=True)
email = models.EmailField(max_length=75, unique=True)
password = models.CharField(max_length=255, default='')
bio = models.TextField()
food_type = models.ManyToManyField(FoodType)
class FoodType(models.Model):
title = models.CharField(max_length=100)
slug = models.SlugField(max_length=110)
Though I think I'm going to try a different way of logging in than storing a password. Maybe openid all that stuff.