Advertisement
Guest User

Untitled

a guest
Feb 25th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         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. [...]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement