Example #1
0
    def get_form_groupby(self, request):
        groupby_fields = self.get_groupby_fields()

        if not groupby_fields:
            return None

        GroupByForm.groupby_fields = groupby_fields
        form = GroupByForm(data=request.GET or None)
        form.is_valid()
        return form
Example #2
0
    def get_form_groupby(self, request):
        groupby_fields = self.get_groupby_fields()

        if not groupby_fields:
            return None

        GroupByForm.groupby_fields = groupby_fields

        form = GroupByForm(data=request.GET or None)
        if hasattr(self, 'hide_show_only_totals') and self.hide_show_only_totals:
            del form.fields['onlytotals']
        form.is_valid()
        return form
Example #3
0
    def get_form_groupby(self, request):
        groupby_fields = self.get_groupby_fields()

        if not groupby_fields:
            return None

        GroupByForm.groupby_fields = groupby_fields
        
        form = GroupByForm(data=request.GET or None)
        if hasattr(self, 'hide_show_only_totals') and self.hide_show_only_totals:
            del form.fields['onlytotals']
        form.is_valid()
        return form