Skip to content

Commit ec50411

Browse files
author
khz
committed
added a second url example to the werkzeug handler
1 parent 25e1ba2 commit ec50411

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pythononwheels/start/handlers/shorties.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,19 @@ class RestHandler(BaseHandler):
4646
def list(self):
4747
self.write("REST")
4848

49+
4950
@app.add_route('/werkzeug/<int:year>', dispatch={"get" : "test"})
51+
@app.add_route('/werkzeug/<uuid:identifier>', dispatch={"get" : "testuuid"})
5052
class WerkzeugTestHandler(BaseHandler):
5153
# on HTTP GET this method will be called. See dispatch parameter.
5254
def test(self, year=None):
5355
self.write("I got year: " + str(year))
54-
56+
57+
def testuuid(self, anotherone=None, identifier=None):
58+
self.write("I got uuid: " + str(identifier)
59+
+ "<hr> I got anotherone ? == " + str(anotherone)
60+
)
61+
5562
@app.add_route("/errortest", dispatch={"get" : "errortest"})
5663
class ErrorTestHandler(BaseHandler):
5764
# on HTTP GET this method will be called. See dispatch parameter.

0 commit comments

Comments
 (0)