View difference between Paste ID: KZyKXfR8 and nnakJEey
SHOW: | | - or go back to the newest paste.
1
class TestReport(Report):
2
    _name = 'testreport.testreport'
3
4
    def __init__(self):
5
        super(TestReport, self).__init__()
6
7
    def parse(self, report, objects, datas, localcontext=None):
8-
        datas['graph'] = [self.generate_graph(objects), 'image/png']
8+
        filename = 'path_to_file/gsn.png'
9
	if os.path.isfile(filename):
10
             f = open(filename)
11
        datas['graph'] = [f, 'image/png']
12
        return super(TestReport, self).parse(report, objects, datas,
13
                localcontext=localcontext)
14
15
[...]