> Workflow in turbogears is very much a "many ways to do it" issue. In
> some cases you may wish to choose more than one strategy depending on
> the nature of your application and task.
>
> If you're using the default controller system, a basic chained formset
> can be done like this:
>
> @expose(template=app.templates.firstpage)
> def firstpage_form(self):
> ...
> return dict(form=formPart1)
>
> @expose()
> @validate(form=formPart1)
> @error_handler(firstpage_form)
> def firstpage_handler(self, name, address,):
> # Can add more complex decision logic here
> return secondpage_form(name, address)
>
> @expose(..template=..)
> def secondpage_form(self, name, address):
> return dict(form=formPart2, value=dict(name=name, address=address))
>
> @expose()
> @validate(form=formPart2)
> @error_handler(secondpage_form)
> def secondpage_handler(self, name, address, phone_number, fax_number):
> # make db record, commit etc
> ...
>
Why is the url not properly displayed when you return self.secondpage?
When you finish with page1 handler and you do:
return self.secondpage( tg_errors, data )
the url is localhost:8080/firstpage_handler
but using redirect the url is properly displayed.
raise tg.redirect( tg.url("secondpage", tg_errors=None, **data) )
localhost:8080/secondpage
What is a proper way to do it?
Lucas
http://lucasmanual.com/mywiki/TurboGears
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---