jeudi 24 mars 2016

Python Error in Web.Py

How can fix it's?

<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>TMN - Telegram Media Network</title>
 </head>
 <body bgcolor="#F5F5F5">
 <img src="flat.png" alt="SAP Logo" width="500px" height="100px"/>
 </body>
</html>
import web
import os

os.chdir('/home/ex50')
urls = (
    '/', 'index'
)

#app = web.application(urls, globals())


class MyApplication(web.application):
    def run(self, port=8080, *middleware):
        func = self.wsgifunc(*middleware)
        return web.httpserver.runsimple(func, ('0.0.0.0', port))

render = web.template.render('templates/')

class index:
    def GET(self):
        return render.index()

if __name__ == "__main__":
    app = MyApplication(urls, globals())
    app.run(port=80)

46.30.167.227:61266 - - [24/Mar/2016 09:07:52] "HTTP/1.1 GET /" - 500 Internal Server Error

46.30.167.227:61268 - - [24/Mar/2016 09:08:12] "HTTP/1.1 GET /" - 200 OK

46.30.167.227:61268 - - [24/Mar/2016 09:08:12] "HTTP/1.1 GET /flat.png" - 404 Not Found




Aucun commentaire:

Enregistrer un commentaire