Many thanks
Daniel's advice solve the problem.
I also try call initial value, form = MyForm(initial={'someArg':
'value',}) It look better, to send data without create __init__ but
this doesn't work to me.
And this working well:
def __init__(self, someArg, *args, **kwargs):
On Feb 22, 10:14 am, Mintaka <[EMAIL PROTECTED]> wrote:
> Hi
>
> I would like to put some data from view to form when I create it.
> Standard way is to use __init__ metod, but after using __init__ in
> form class,
> form stop working.
>
> Pleas what I'am doing wrong?
>
> Fragments of example
>
>
Hi,
Don't implement __init__ yourself, you can pass initial data to the
form like this :
form = MyForm(initial={'someArg': 'value',})
Hope that helps,
Mike
On 22 Feb 2008, at 10:14, Mintaka wrote:
>
> Hi
>
> I would like to put some data from view to form when I create it.
> Standard way
Hi
I would like to put some data from view to form when I create it.
Standard way is to use __init__ metod, but after using __init__ in
form class,
form stop working.
Pleas what I'am doing wrong?
Fragments of example
- view -
def MyView(request):
4 matches
Mail list logo