Creating form object for variable kind of form.
Posted
by Bunny Rabbit
on Stack Overflow
See other posts from Stack Overflow
or by Bunny Rabbit
Published on 2010-06-11T09:59:18Z
Indexed on
2010/06/11
10:02 UTC
Read the original article
Hit count: 256
i want to create a form for users to submit questions in django ..so far the models i have created are
class Question(models.Model):
statement=models.CharField(max_length=100)
class Choice(models.Model):
statement=models.CharField(max_length=100)
value=models.IntegerField()
question=models.ForeignKey(Question)
Now i want to write a Form class for creating a above form but the problem is the number of choices are variable,a user can decide how many choices a question must have .How do i do that in django?
© Stack Overflow or respective owner