Hi,

How can the inlineformset_factory be used for multiple following
foreignKeys at following an example?

class Recipe(models.Model):
    pub_date = models.DateTimeField('Date Published', auto_now_add = True)
    title = models.CharField(max_length=200)
    instructions = models.TextField()

class Ingredients(models.Model):
    pub_date = models.DateTimeField('Date Published', auto_now_add = True)
    title = models.CharField(max_length=200)
    instructions = models.TextField()

class RecipeIngredient(models.Model):
    recipe = models.ForeignKey(Recipe)
    ingredient = models.ForeignKey(Ingredients)


ingredientFormSet = inlineformset_factory(Recipe, Ingredients,
RecipeIngredient) doesn't seem work.

Thank you.

- jup

-- 
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 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA%3DhcWSsR%2B1j1aL0n_XUMEEmWm%2BJRXFPuPX9FGNjkZpJsNr7Zg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to