Re: How can I make the field layout of a model form dynamic?

2014-10-22 Thread Bill Freeman
Perhaps the most djangoish way would be to create two model forms, with different fields excluded, and choose which to render in the template. Or you could render CSS style information to hide one or the other. Or you could use JavaScript to hide one or the other based on something else that you

How can I make the field layout of a model form dynamic?

2014-10-22 Thread DJ-Tom
Hi, I have a model that contains either a text or a numerical information, based on the type of the entry: equipment = models.ForeignKey(equipment) number = models.DecimalField('Amount/number', max_digits=6, decimal_places=2, blank=True, null=False, default=0) text = models.TextField("Text",