コード例 #1
0
ファイル: views.py プロジェクト: xkmato/casepro
        def get_context_data(self, **kwargs):
            context = super(ContactCRUDL.Cases, self).get_context_data(**kwargs)

            cases = Case.get_all(self.request.org, self.request.user).filter(contact=self.object).order_by('-opened_on')
            cases = cases.prefetch_related('labels').select_related('contact', 'assignee')

            context['object_list'] = cases
            return context
コード例 #2
0
        def get_context_data(self, **kwargs):
            context = super(ContactCRUDL.Cases,
                            self).get_context_data(**kwargs)

            cases = (Case.get_all(self.request.org, self.request.user).filter(
                contact=self.object).order_by("-opened_on"))
            cases = cases.prefetch_related("labels").select_related(
                "contact", "assignee")

            context["object_list"] = cases
            return context
コード例 #3
0
        def get_context_data(self, **kwargs):
            context = super(ContactCRUDL.Cases,
                            self).get_context_data(**kwargs)

            cases = Case.get_all(self.request.org, self.request.user).filter(
                contact=self.object).order_by('-opened_on')
            cases = cases.prefetch_related('labels').select_related(
                'contact', 'assignee')

            context['object_list'] = cases
            return context