When you build the page with your own HTML template, the viewer's scripts and body can be emitted separately so they fit your layout.

Emit the JS and HTML parts into a template.
viewer = StiViewer()
viewer.options.width = '1000px'
viewer.options.height = '600px'

if viewer.processRequest(request):
    return viewer.getFrameworkResponse()

report = StiReport()
report.loadFile(url_for('static', filename='reports/SimpleList.mrt'))
viewer.report = report

js = viewer.javascript.getHtml()
html = viewer.getHtml()
return render_template('...html', viewerJavaScript=js, viewerHtml=html)

How it works. The component is split into script and body, letting you place the viewer anywhere inside your own Jinja template.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.