Exemple #1
0
 def test_render_to(self):
     context = {
         'username': '******',
         'balance': 10.01
     }
     html_fd = render_to('html', 'sample.odt', context)
     html_data = html_fd.read()
     html_fd.close()
     self.assertTrue('John Doe' in html_data)
Exemple #2
0
 def test_render_to(self):
     context = {"username": "******", "balance": 10.01}
     html_fd = render_to("html", "sample.odt", context)
     html_data = html_fd.read()
     html_fd.close()
     self.assertTrue("John Doe" in html_data)
def renderDocPdf(odtfile, format):
    docfile = render_to(format, odtfile)
    return os.path.abspath(docfile.name)
Exemple #4
0
def renderDocPdf(odtfile, format):
    docfile = render_to(format, odtfile)
    return os.path.abspath(docfile.name)