def render_real_htmldiv(self, real_root, price_map, price_date, options_map, file): postings = self.get_postings(real_root) render_postings = self.args.verbosity == journal_text.VERBOSE journal_html.html_entries_table_with_balance(file, postings, self.formatter, render_postings)
def test_html_entries_table_with_balance(self): oss = io.StringIO() formatter = html_formatter.HTMLFormatter( display_context.DEFAULT_DISPLAY_CONTEXT) journal_html.html_entries_table_with_balance( oss, self.real_account.txn_postings, formatter, True) html = oss.getvalue() self.assertTrue(isinstance(html, str)) self.assertRegex(html, '<table')
def link(link=None): "Serve journals for links." linked_entries = basicops.filter_link(link, app.entries) oss = io.StringIO() formatter = HTMLFormatter(app.options['dcontext'], request.app.get_url, False, app.account_xform, view_links=False) journal_html.html_entries_table_with_balance(oss, linked_entries, formatter) return render_global( pagetitle="Link: {}".format(link), contents=oss.getvalue())