Moved from php to python

This commit is contained in:
Thomas FORGIONE
2015-04-12 21:13:41 +02:00
parent 35a8522088
commit 925f6bab74
30 changed files with 4886 additions and 124 deletions

10
errors/404/index.html Normal file
View File

@@ -0,0 +1,10 @@
<section>
<h2>Error 404</h2>
<p>
The page you requested was not found... this is annoying :s
</p>
<p>
You can go back to the <a href="/">index</a> or wherever you want...
</p>
#
</section>

23
errors/404/index.py Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from webtools import Web
def main():
print('Content-type: text/html')
print()
page = Web.Element(Web.ROOT_DIR + 'templates/page.html')
head = Web.Element(Web.ROOT_DIR + 'templates/head.html')
body = Web.Element(Web.ROOT_DIR + 'templates/body.html')
content = Web.Element('index.html')
page.add_child(head)
page.add_child(body)
body.add_child(content)
page.print()
if __name__ == '__main__':
main()