|
|
@@ -15,7 +15,7 @@ class NoContentException(Exception):
|
|
15
|
15
|
pass
|
|
16
|
16
|
|
|
17
|
17
|
|
|
18
|
|
-class Controllers(object):
|
|
|
18
|
+class PyramidController(object):
|
|
19
|
19
|
@hapic.with_api_doc()
|
|
20
|
20
|
@hapic.output_body(AboutResponseSchema())
|
|
21
|
21
|
def about(self, context, request):
|
|
|
@@ -24,7 +24,7 @@ class Controllers(object):
|
|
24
|
24
|
"""
|
|
25
|
25
|
return {
|
|
26
|
26
|
'version': '1.2.3',
|
|
27
|
|
- 'datetime': datetime.now(),
|
|
|
27
|
+ 'datetime': datetime(2017, 12, 7, 10, 55, 8, 488996),
|
|
28
|
28
|
}
|
|
29
|
29
|
|
|
30
|
30
|
@hapic.with_api_doc()
|
|
|
@@ -119,7 +119,7 @@ class Controllers(object):
|
|
119
|
119
|
|
|
120
|
120
|
if __name__ == "__main__":
|
|
121
|
121
|
configurator = Configurator(autocommit=True)
|
|
122
|
|
- controllers = Controllers()
|
|
|
122
|
+ controllers = PyramidController()
|
|
123
|
123
|
controllers.bind(configurator)
|
|
124
|
124
|
hapic.set_context(hapic.ext.pyramid.PyramidContext(configurator))
|
|
125
|
125
|
time.sleep(1)
|