a controller can contain multiple function, each one of them can have a
return dict(afixedname=avalue) ..... when you use an url like
/app/controller/display_a_form or /app/controller/display_a_form2 you may
return the same dict with the same keys for both, the values are the one
that will be different instances and will be serialized accordingly,
generally using to your views/controller/display_a_form.html or
views/controller/display_a_form2.html
On Friday, January 18, 2013 3:47:28 PM UTC+1, Alex Glaros wrote:
>
> Thanks Denes,
>
> but it seems that "form" doesn't uniquely identify anything, or is the
> "return
> dict(form=form)" the part that gives the output a unique name?
>
> I mean would other functions in the same controller have syntax to give
> distinguishing names such as
>
> "return dict(form2=form2)", and "return dict(form3=form3)", and "return
> dict(form4=form4)"?
>
> Thanks,
>
> Alex Glaros
>
>
> On Friday, January 18, 2013 3:48:29 AM UTC-8, DenesL wrote:
>>
>>
>> Hi Alex,
>>
>> you can't call the function from the view, you would have to pass it
>> somehow or re-define it there, but the question is why?.
>>
>> Normally you would just write {{=form}} in the view to display the form
>> returned form the function.
>>
>> Regards,
>> Denes
>>
>
--