Skip to content
Snippets Groups Projects
Commit 1e105b01 authored by tux091's avatar tux091
Browse files

Final touch in order to run with application embeded in the browser.

parent 7a897195
No related branches found
No related tags found
No related merge requests found
......@@ -22,21 +22,25 @@ def report_2():
"""
vars = request.vars
fmt = vars.Foo1My_format
# user request a file with a specific format (latex,...)
# return to the browser na iframe balise with a new URL
# the browser will request the file locate at the url
if vars.Foo1My_format and vars.Foo1My_format == 'latex':
# The iframe occupy all the space in the receiving container
# it is usefull for embeded application like acroread.
if fmt and fmt != 'html':
# remove the field use to select the file format
# in order to avoid circular loop
del vars.Foo1My_format
s = IFRAME(_id='MyId',
_frameborder=0,
_width=0,
_height=0,
_css='display:none;visibility:hidden;height:0px;',
_src=URL('reports', 'report_2.latex', vars=vars)).xml()
_width="100%",
_height="100%",
_src=URL('reports', 'report_2.%s' % fmt, vars=vars)).xml()
# remove the field use to select the file format
# in order to avoid circular loop
del fmt
return s
......
......@@ -5,7 +5,7 @@
\begin{document}
\section*{Test}
\begin{enumerate}
{{for k in test:}}
\item {{=k}}: {{=test[k]}}{{pass}}
{{for k in test:}}\item {{=k.replace('_', ' ')}}: {{=test[k]}}
{{pass}}
\end{enumerate}
\end{document}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment