Here are the examples of the python api web.webapi.notfound taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
def GET(self,filename):
if filename.endswith("favicon.ico"):
web.webapi.notfound()
return ""
if filename == "jvm.js":
web.header('Content-Type', 'text/javascript')
return commands.getstatusoutput("cat ../src/*.js | cpp -DDEBUG -DDEBUG_INTRP -I../src/ -P -undef -CC -Wundef -std=c99 -nostdinc -Wtrigraphs -fdollars-in-identifiers")[1]
if "testRuntime" in filename:
alphex = filename[filename.rfind("/") + 1:];
return file("../runtime/" + alphex.replace(".","/") + ".class").read();
if filename == "":
return file("index.html").read()
try:
return file(filename).read()
except:
web.webapi.notfound()
return ""