solve:  use response.render:

in controller:
            from gluon.fileutils import read_file
            spath = 'static/pages/' + cat.folder + '/'
            spath1 = '/' + request.application + '/' + spath
            h += XML(response.render(request.folder + spath + rec.file_, 
dict(sp=spath1)))
Введите код...






среда, 24 июня 2015 г., 9:43:21 UTC+3 пользователь Dmitry Ermolaev написал:
>
> {{if 'page' in globals():}}
> {{include page}}
> {{else:}}
> {{=list}}
> {{pass}}
>
> erro - 
>
>  File "C:\web2py-m\gluon\template.py", line 684, in parse
>     self.include(top, value)
>   File "C:\web2py-m\gluon\template.py", line 462, in include
>     text = self._get_file_text(filename)
>   File "C:\web2py-m\gluon\template.py", line 439, in _get_file_text
>     filename = eval(filename, context)
>   File "<string>", line 1, in <module>
> NameError: name 'page' is not defined
>
>
> OR how include HTML file in controller?
>

-- 
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