Hi,
I have not been able to use web.py framework with Google App engine.
It errors out while importing templates.
Can anyone point out what am I doing wrong?
Thanks
Pankaj
DETAILS
My project hierarchy:
mysite
-templates
-index.html
-web ( this is the folder 'web' from downloaded web.py tar.
version: 0.31)
-app.yaml
-main.py
-----------------------------------------------------------------------------------------
#main.py
import web
urls = (
'/', 'index',
)
render = web.template.render('templates/')
class index:
def GET(self):
return render.index()
app = web.application(urls, globals())
main = app.cgirun()
-------------------------------------------------------------------------------------------
Error:
Traceback (most recent call last):
File "C:\Dev\GoogleAppEngine\google\appengine\tools
\dev_appserver.py", line 2443, in _HandleRequest
base_env_dict=env_dict)
File "C:\Dev\GoogleAppEngine\google\appengine\tools
\dev_appserver.py", line 353, in Dispatch
base_env_dict=base_env_dict)
File "C:\Dev\GoogleAppEngine\google\appengine\tools
\dev_appserver.py", line 1869, in Dispatch
self._module_dict)
File "C:\Dev\GoogleAppEngine\google\appengine\tools
\dev_appserver.py", line 1787, in ExecuteCGI
reset_modules = exec_script(handler_path, cgi_path, hook)
File "C:\Dev\GoogleAppEngine\google\appengine\tools
\dev_appserver.py", line 1683, in ExecuteOrImportScript
exec module_code in script_module.__dict__
File "C:\Dev\workspace\mysite\main.py", line 7, in <module>
render = web.template.render('templates/')
File "C:\Dev\workspace\mysite\web\template.py", line 984, in
__init__
self.mod = __import__(name, None, None, ['x'])
ImportError: No module named templates
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---