so that worked but I am getting none being returned now
this is the code
and the html looks like this
$def with (name)
Hello $name!
///////////
import web
import os
template_root = os.path.join(('/var/www/vhosts/zevenwolf.com/httpdocs/
webpy'), "templates")
render = web.template.render(template_root)
#status = '200 OK'
#output = 'goodbye'
urls = (
'/.*', 'index',
)
class index:
def GET(self):
print render.index('world')
if __name__ == "__main__": app.run()
application = web.application(urls, globals()).wsgifunc()
On Sep 5, 12:50 pm, Anand Chitipothu <[email protected]> wrote:
> 2010/9/5 zevenwolf <[email protected]>:> So I am trying to use templator. I
> am getting an error. I dont know if
> > it is an issue with webpy looking at the wrong site-package or my code
>
> > This is the code I am using
>
> > import web
> > render = web.template.render('templates')
>
> [...]
>
> Looks like the working directory of the process is different from the code.
>
> Try this:
>
> import web
> import os
>
> template_root = os.path.join(os.path.dirname(__file__), "templates")
> render = web.template.render(template_root)
--
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.