Explorar el Código

hotfix for generate doc

Bastien Sevajol hace 6 años
padre
commit
76099f5b4f
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      hapic/context.py
  2. 2 2
      hapic/hapic.py

+ 1 - 1
hapic/context.py Ver fichero

@@ -76,6 +76,6 @@ class BottleContext(ContextInterface):
76 76
             status=int(http_code),
77 77
         )
78 78
 
79
-    # FIXME: Pas generique
79
+    # FIXME: Pas generique, marche pas en plus :'(
80 80
     def get_app(self):
81 81
         return bottle.default_app()

+ 2 - 2
hapic/hapic.py Ver fichero

@@ -259,9 +259,9 @@ class Hapic(object):
259 259
             return decoration.get_wrapper(func)
260 260
         return decorator
261 261
 
262
-    def generate_doc(self):
262
+    def generate_doc(self, app):  # FIXME: j'ai du tricher avec app
263 263
         # FIXME @Damien bottle specific code !
264 264
         # rendre ca generique
265
-        app = self._context.get_app()
265
+        app = app or self._context.get_app()
266 266
         doc_generator = DocGenerator()
267 267
         return doc_generator.get_doc(self._controllers, app)