On Tue, 2011-03-22 at 08:15 -0400, Karen Tracey wrote:
> > that the same code is being written twice)
> >
>
> Russ has already answered so I'm not going to repeat what he said.
> I'll
> note, though, that there's some good doc on this (overriding default
> field
> values in a model form) here:
> h
On Tue, Mar 22, 2011 at 2:31 AM, Kenneth Gonsalves
wrote:
> on running this, I get a form with two fields, name and age. Which is
> what is wanted. So is there anything wrong in coding it this way? I am
> asking this because a co-worker submitted code like this and it is
> working, so I do not kno
On Tue, 2011-03-22 at 14:41 +0800, Russell Keith-Magee wrote:
> > working, so I do not know how to react (apart from the obvious
> comment
> > that the same code is being written twice)
>
> Aside from the redundancy, there's nothing inherently wrong with this.
>
> The fact that this is allowed at
On Tue, Mar 22, 2011 at 2:31 PM, Kenneth Gonsalves
wrote:
> hi
>
> assume a model:
>
> Mymodel
> name=CharField
> age = IntegerField
>
> and a ModelForm:
>
> Mymodelform(forms.ModelForm):
> name = forms.CharField()
> age = forms.IntegerField()
> class Meta:
> mo
hi
assume a model:
Mymodel
name=CharField
age = IntegerField
and a ModelForm:
Mymodelform(forms.ModelForm):
name = forms.CharField()
age = forms.IntegerField()
class Meta:
model = Mymodel
on running this, I get a form with two fields, name and age. Which
5 matches
Mail list logo