Hi all,

Say If there are two views as below:

*class ViewOne(object):*
*    def __init__(self, request):*
*        self.request=request*

*    @view_config(route_name='a', renderer='json')*
*    def view_a(self):*
*        return {'viewA: some_dict}*

*class ViewTwo(object):*
*    def __init__(self, request):*
*        self.request=request*

*    @view_config(route_name='b', renderer='json')*
*    def view_b(self):*
*        return {'viewA: some_dict_too}*


both of them return response as json. What is the best way to combine both 
responses as a single response in another views?
For example:


*@view_config(route_name="special_view', renderer='json')*
*def special_view(request)*
*        return {'viewA: some_dict, 'viewB': some_dict_too}*


I tried using subrequest, however, I couldn't find a way to merge the two 
responses returned by the two views.

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to