Hi Mike.

Here's my hack.

*static/anHTMLfile.html*













*<!DOCTYPE html><html lang="en"><head>  <meta charset="UTF-8">  
<title>anHTMLfile</title></head><body>HELLO from anHTMLfile.html <br/>see 
<a 
href="https://groups.google.com/forum/#!topic/web2py/Wqipxb_5-j4";>https://groups.google.com/forum/#!topic/web2py/Wqipxb_5-j4</a></body></html>controllers/default.py*












*def showHTMLFile():    '''    
https://groups.google.com/forum/#!topic/web2py/Wqipxb_5-j4    '''    import 
os    with open(os.path.join(request.folder, 'static', 'anHTMLfile.html')) 
as x:        file_contents = x.read()    return 
dict(file_contents=XML(file_contents))views/default/showHTMLfile.html*


*{{=file_contents}}Love and peace,*
*Joe*

On Friday, May 13, 2016 at 8:14:45 AM UTC-7, Mike Stephenson wrote:
>
> I tried the following but it didn't work.
> in controller:
>
> def rough():
>     import os
>     file = open(os.path.join(request.folder, 'static','index.html'))
>     return locals()
>
>
> in view:
>
> {{extend 'layout.html'}}
> {{=file}}
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to