Skip to content

Commit 0fcc31a

Browse files
author
khz
committed
unckecked checkboxes work as well
1 parent 271e631 commit 0fcc31a

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

pythononwheels/start/decoders.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ def pow_init_from_dict_deserializer(dct, schema, simple_conversion=False):
6161
elif schema[elem]["type"].lower() == "boolean":
6262
if not isinstance(dct[elem], (bool)):
6363
try:
64+
if isinstance(dct[elem], (str)):
65+
dct[elem] = int(dct[elem])
6466
dct[elem] = bool(dct[elem])
6567
except Exception as e:
6668
raise e

pythononwheels/start/stubs/rest_handler_template.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ class {{handler_class_name}}(PowHandler):
1313
# every pow handler automatically gets these RESTful routes
1414
# thru the @app.add_rest_routes() decorator.
1515
#
16-
# 1 GET /user #=> list
17-
# 2 GET /user/1 #=> show
18-
# 3 GET /user/new #=> new
19-
# 4 GET /user/1/edit #=> edit
20-
# 5 GET /user/page/1 #=> page
21-
# 6 GET /user/search #=> search
22-
# 7 PUT /user/1 #=> update
23-
# 8 PUT /user #=> update (You have to send the id as json payload)
24-
# 9 POST /user #=> create
25-
# 10 DELETE /user/1 #=> destroy
16+
# 1 GET /{{handler_name}} #=> list
17+
# 2 GET /{{handler_name}}/1 #=> show
18+
# 3 GET /{{handler_name}}/new #=> new
19+
# 4 GET /{{handler_name}}/1/edit #=> edit
20+
# 5 GET /{{handler_name}}/page/1 #=> page
21+
# 6 GET /{{handler_name}}/search #=> search
22+
# 7 PUT /{{handler_name}}/1 #=> update
23+
# 8 PUT /{{handler_name}} #=> update (You have to send the id as json payload)
24+
# 9 POST /{{handler_name}} #=> create
25+
# 10 DELETE /{{handler_name}}/1 #=> destroy
2626
#
2727

2828
# standard supported http methods are:

0 commit comments

Comments
 (0)