'Sends back an AJAX-appropriate response for the tab group if needed.
Otherwise renders the response as normal.'

def handle_tabbed_response(self, tab_group, context):

    if self.request.is_ajax():
        if tab_group.selected:
            return http.HttpResponse(tab_group.selected.render())
        else:
            return http.HttpResponse(tab_group.render())
    return self.render_to_response(context)
