summaryrefslogtreecommitdiff
path: root/tools/web/main.py
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2013-06-09 20:38:38 +0200
committerJessica Tölke <jtoelke@mail.upb.de>2013-06-09 20:38:38 +0200
commit7f4410f9d5dce2884368a4b1d01139abd2e65fd5 (patch)
treee4f6cd0f6ed40b1852fa5ce28a5d78be982b0a73 /tools/web/main.py
parent8ac35610a416d3937ccf4b3b74a61622382e8162 (diff)
parentfa2ffc29c1ef2c33ff0a9c1baf7026a4d9ffe0b6 (diff)
downloadserverdata-7f4410f9d5dce2884368a4b1d01139abd2e65fd5.tar.gz
serverdata-7f4410f9d5dce2884368a4b1d01139abd2e65fd5.tar.bz2
serverdata-7f4410f9d5dce2884368a4b1d01139abd2e65fd5.tar.xz
serverdata-7f4410f9d5dce2884368a4b1d01139abd2e65fd5.zip
Merge remote-tracking branch 'origin/master' into waric
Conflicts: world/map/db/item_db.txt
Diffstat (limited to 'tools/web/main.py')
-rwxr-xr-xtools/web/main.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/web/main.py b/tools/web/main.py
new file mode 100755
index 00000000..b7501c5c
--- /dev/null
+++ b/tools/web/main.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python2.6
+
+from flask import Flask
+
+from with_xml import Node
+
+app = Flask(__name__)
+
+@app.route('/')
+def index():
+ content = Node()
+ tag = content.tag
+ put = content.put
+ a = tag('a')
+ with tag('html'):
+ with tag('head'):
+ with tag('title'):
+ put('Title')
+ with tag('body'):
+ with tag('h1'):
+ put('Header')
+ put('This is ')
+ with a(href='http://google.com/'):
+ put('a link to Google.')
+ return str(content)
+
+if __name__ == '__main__':
+ app.run(debug=True)