Make sure that your templates directory is in the same directory that your python file is
On Friday, September 14, 2012 2:29:18 PM UTC-4, Pete D wrote: > > I ran the simple code from the tutorial for templates on a PC and I keep > getting the following error > > ImportError: No module named templates > > whenever I do this render = web.template.render('templates/') > I have the template directory set up with an html file in it. > > Here is the code > import web > > render = web.template.render('templates/') > > urls = ( > '/', 'index' > ) > > class index: > def GET(self): > return render.base() > > if __name__ == "__main__": > app = web.application(urls, globals()) > app.internalerror = web.debugerror > app.run() > -- You received this message because you are subscribed to the Google Groups "web.py" group. To view this discussion on the web visit https://groups.google.com/d/msg/webpy/-/ScvKfwRmeo8J. To post to this group, send email to webpy@googlegroups.com. To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.