Browse Source

Removing fake app from flask example

Guénaël Muller 6 years ago
parent
commit
143b9310d6
1 changed files with 1 additions and 28 deletions
  1. 1 28
      example/example_a_flask.py

+ 1 - 28
example/example_a_flask.py View File

@@ -37,34 +37,7 @@ def bob(f):
37 37
         return f(*args, **kwargs)
38 38
     return boby
39 39
 
40
-
41
-class FlaskRoute(object):
42
-
43
-    def __init__(self, app, rule, method, callback, name, **options):
44
-        self.app = app
45
-        self.rule = rule
46
-        self.method = method
47
-        self.callback = callback
48
-        self.name = name
49
-
50
-
51
-class Flaskapp(Flask):
52
-    @property
53
-    def routes(self):
54
-        result = []
55
-        for r in self.url_map.iter_rules():
56
-            rule = r.rule
57
-            callback = self.view_functions[r.endpoint]
58
-            method = [x for x in r.methods if x not in [
59
-                'OPTIONS', 'HEAD']][0]  # TODO : other solution ?
60
-            name = r.endpoint
61
-            app = self
62
-            f = FlaskRoute(self, rule, method, callback, name)
63
-            result.append(f)
64
-        return result
65
-
66
-
67
-app = Flaskapp(__name__)
40
+app = Flask(__name__)
68 41
 
69 42
 
70 43
 class Controllers(object):