Re: How to put some data from view the form

2008-02-22 Thread Mintaka
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):

Re: How to put some data from view the form

2008-02-22 Thread Daniel Roseman
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 > >

Re: How to put some data from view the form

2008-02-22 Thread Mike H
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

How to put some data from view the form

2008-02-22 Thread Mintaka
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):