Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

default argument in flask route

@user.route('/<user_id>', defaults={'username': None})
@user.route('/<user_id>/<username>')
def show(user_id, username):
    pass
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #default #argument #flask #route
ADD COMMENT
Topic
Name
5+1 =