예제 #1
0
파일: forms.py 프로젝트: xhijack/shuup
    def get_report_instance(self):
        """
        :rtype: shuup.reports.reporter.base.ShuupReportBase
        """
        from shuup.reports.report import get_report_class

        data = self.cleaned_data
        writer_name = data.pop("writer")

        report_class = get_report_class(data["report"])
        report = report_class(writer_name=writer_name, **data)
        return report
예제 #2
0
파일: forms.py 프로젝트: gurch101/shuup
    def get_report_instance(self):
        """
        :rtype: shuup.reports.reporter.base.ShuupReportBase
        """
        from shuup.reports.report import get_report_class

        data = self.cleaned_data
        writer_name = data.pop("writer")

        report_class = get_report_class(data["report"])
        report = report_class(writer_name=writer_name, **data)
        return report
예제 #3
0
    def get_report_instance(self, request=None):
        """
        :rtype: shuup.reports.reporter.base.ShuupReportBase
        """
        from shuup.reports.report import get_report_class

        data = self.cleaned_data

        report_class = get_report_class(data["report"], request)
        writer_name = data.pop("writer")
        if request:
            data.update({"request": request})
        report = report_class(writer_name=writer_name, **data)
        return report
예제 #4
0
파일: forms.py 프로젝트: ruqaiya/shuup
    def get_report_instance(self, request=None):
        """
        :rtype: shuup.reports.reporter.base.ShuupReportBase
        """
        from shuup.reports.report import get_report_class

        data = self.cleaned_data

        report_class = get_report_class(data["report"], request)
        writer_name = data.pop("writer")
        if request:
            data.update({"request": request})
        report = report_class(writer_name=writer_name, **data)
        return report