Actually I stand corrected, no need to build a format all.
*django.forms.fields_for_model* provides just the fields for model and
their widgets. Awesome. Neat and tidy.
On Wednesday, 21 March 2018 13:08:31 UTC+11, Bernd Wechner wrote:
>
> Andréas and Andreas,
>
> I admit I smiled to see Andréas
Andréas and Andreas,
I admit I smiled to see Andréas seconding Andreas' post ;-). One my best
friends in primary school was an Andreas ;-).
Given I have no form and don't want one, ModelForm in its declarative for
seems undesirable. But your thinking is good and I realise in response and
in re
Hi,
Like Andreas is saying the only way to define the default widgets is to use
a form - and the simplest way to define a form is to use a ModelForm.
When you use Django you should do best by trying to work WITH the framework
instead of working against it. Forms are used for connecting templates
Without a form you can't get the Widget which is used by default. Are the
fields always the same? If yes you could create a ModelForm on the fly and
render the fields manually.
Best regards,
Andreas
--
You received this message because you are subscribed to the Google Groups
"Django users"
Pulling my hair out again.
I don't have a form, nor want a form, stunning really, but I just have the
model. And I want the field widgets.
I can't seem to find them anywhere. I know you can specify widget= on form
fields when declaring the model, but can't find it anywhere in the data
struct
5 matches
Mail list logo