Hi,

first of all: please don't "hijack" discussion threads like this. Many 
people read their mails in threaded form, and this discussion appears as 
part of a totally unrelated thread.

> I'm a python/turbogears newbie.
> I've been searching the docs for an example of calling one
> controller from another and have come up empty.
> 
> Reason:
> I've copied the movie toscawidgets tutorial in setting up
> a controller to create a form instance 
> 
>  create_enrol_form = EnrolmentForm("create_enrol_form", action='create')
>     
> and display the form by sending it to the create controller:
> 
>      @validate(create_enrol_form,error_handler=enrol)
>      @expose()
>      def create(self, **kw):
>         ...
>         raise redirect("list")  <-- this is the line I'd like to change
> 
> After form validation, I want to display a message on the screen that 
> is populated with data from the form and from a "related" table,
> so I'd like to pass to a template two objects that can be used as data
> for the message.
> I can send in the dicts of the two objects but that seems messy - 
> especially in the url (GET method).


I might be missing something here, but why don't you add a template to 
the create's expose-decorator, and return the passed form-data as well 
as anything based on that as usual?

Diez

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to