Browse Source

Merge branch 'flask'

Roland Haroutiounian 9 years ago
parent
commit
220f7ea7c3
4 changed files with 27 additions and 1 deletions
  1. 1
    0
      Router/__init__.py
  2. 4
    0
      Router/urls.py
  3. 20
    0
      lodel.py
  4. 2
    1
      requirements.txt

+ 1
- 0
Router/__init__.py View File

@@ -0,0 +1 @@
1
+from urls import *

+ 4
- 0
Router/urls.py View File

@@ -0,0 +1,4 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+# This module contains the different functions used to deal with the Lodel 2 urls
4
+

+ 20
- 0
lodel.py View File

@@ -0,0 +1,20 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+from flask import Flask
4
+from flask import request
5
+
6
+import Router
7
+
8
+app = Flask(__name__)
9
+
10
+
11
+@app.route('/', defaults={'path': ''})
12
+@app.route('/<path:path>')
13
+def index(path):
14
+    url_elements = path.split('/')
15
+    url_arguments = request.args
16
+    return "%s" % url_elements
17
+
18
+
19
+if __name__ == '__main__':
20
+    app.run()

+ 2
- 1
requirements.txt View File

@@ -2,4 +2,5 @@ PyMySQL==0.6.7
2 2
 mosql==0.11
3 3
 pep8==1.6.2
4 4
 pylint==1.4.4
5
-jinja2==2.8
5
+jinja2==2.8
6
+Flask==0.10.1

Loading…
Cancel
Save