Tomasz, it was obvious for me too, however, I had defined a form,
which had some fields overridden, but some not- I was hoping that
options for fields that were not overridden were preserved, but due to
specific way admin interface handles forms, required class wasn't
added to my custom form field
On 7 Lis, 18:25, fest wrote:
> From my experience, max_length is not taken into account when you
> override model field in form field.
This is (and was, when I first time faced it) quite obvious for me .
If ModelForm was modifying overridden fields, the whole concept
of overriding would be usele
>From my experience, max_length is not taken into account when you
override model field in form field. In this case I don't know of any
trivial way to read other field properties from model description.
Regards, Reinis
On 20 okt., 17:54, Karen Tracey wrote:
> On Thu, Oct 15, 2009 at 12:30 PM,
On Thu, Oct 15, 2009 at 12:30 PM, Gerard wrote:
>
> Hi All,
>
> It seems the max_lenght from the model definition is not respected
> thoughout
> the form that's created when using Modelform.
>
> company_name = models.CharField(max_length=75)
>
> Is this correct or am I missing something?
>
T
Hi All,
It seems the max_lenght from the model definition is not respected thoughout
the form that's created when using Modelform.
company_name = models.CharField(max_length=75)
Is this correct or am I missing something?
And while violating DRY is the Modelform definition the best place t
5 matches
Mail list logo