File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,9 @@ History
1010------------------
1111
1212* added test suite
13- * added path_param type casting
13+ * added path_param type casting
14+
15+ 1.1.0(2018-03-01)
16+ ------------------
17+
18+ * request can be renamed and even type-annotated
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ app = Sanic("test_sanic_app")
2222
2323@app.route (" /me/<id>/birthdate" , methods = [' GET' ])
2424@parse_query_args
25- async def test_datetime (request , id : str , birthdate : datetime.datetime):
25+ async def test_datetime (req , id : str , birthdate : datetime.datetime):
2626 return response.json({
2727 ' id' : id ,
2828 ' birthdate' : birthdate.isoformat()
@@ -53,4 +53,6 @@ You need to apply the `parse_query_args` decorator as the first one executed whi
5353
5454### ` request ` is mandatory!
5555
56- You should always have request as the first argument in your function in order to use ` parse_query_args `
56+ You should always have request as the first argument in your function in order to use ` parse_query_args ` .
57+
58+ ** Note** that ` request ` arg can be renamed and even type-annotated as long as it is the first arg.
Original file line number Diff line number Diff line change 1- __version__ = '1.0 .0'
1+ __version__ = '1.1 .0'
You can’t perform that action at this time.
0 commit comments