i have a few simple python progs which run nicely on 1 system, but fail on another system w/ the error:
No template named formtest.
both systems are debian based, both running python 2.7.x.
specifically, the (works:doesn't work)- (Ubuntu 13.10: Debian 7 ) (python 2.7.5+: python 2.7.3 )
permissions for the prog and the web tree are identical on both systems.
the program runs on each system by a user w/ the same privs.
i hope this is something simple i'm overlooking.
any ideas?
tnx,
ams
here's an example of a program that runs on 1 sys and fails on the other:
#!/usr/bin/env python
# scanip.py
import web
from web import form
render = web.template.render('templates/')
urls = (
'/', 'index'
)
app = web.application(urls, globals())
scanip = form.Form(
)
scanspec = scanip()
#print scanspec.render()
class index:
def GET(self):
form = scanip()
# make sure you create a copy of the form by calling it (line above)
# Otherwise changes will appear globally
return render.formtest(form)
def POST(self):
form = scanip()
if not form.validates():
return render.formtest(form)
# else:
# return "Grrreat success! boe: %s, bax: %s" % (form.d.boe, form['bax'].value)
# return "success!"
if __name__=="__main__":
web.internalerror = web.debugerror
app.run()