Skip to content

Commit

Permalink
Rewrites UP/DOWN rule using 2 regexps
Browse files Browse the repository at this point in the history
  • Loading branch information
matael committed Jun 6, 2012
1 parent 9b7477e commit 5f409d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion today_quote.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def new_quote_form():
""" display the form for adding quote """
return template("templates/form.html")

@get("/<id:int>/<do:re:(up)|(down)>")
@get("/<id:re:\d+>/<do:re:(up)|(down)>")
def upvote(id, do):
if do=="up":
request_get = "SELECT vote_up FROM quotes WHERE id LIKE ?"
Expand Down

0 comments on commit 5f409d2

Please sign in to comment.