Beispiel #1
0
    def build_layout(self, conversation):
        """
        Returns a conversation's dashboard widget data.
        Override to specialise dashboard building.
        """
        reports_config = self._get_reports_config(conversation)
        if reports_config is None:
            return super(JSBoxReportsView, self).build_layout(conversation)

        layout_config = reports_config.get('layout')
        layout = ConversationReportsLayout(conversation, layout_config)
        return layout
Beispiel #2
0
 def setUp(self):
     self.vumi_helper = self.add_helper(DjangoVumiApiHelper())
     self.user_helper = self.vumi_helper.make_django_user()
     self.conv = self.user_helper.create_conversation(u'dummy')
     self.layout = ConversationReportsLayout(self.conv)