@mod.route('/participate/<survey_id>/', defaults = {'work_id':None}, methods = ['GET','POST'])
@mod.route('/pariicipate/<survey_id>/<work_id>', methods = ['GET', 'POST'])
def participate(survey_id, work_id):
/* do_something .. */
I can access http://localhost:5000/participate/512dc365fe8974149091be1f
or http://localhost:5000/participate/512dc365fe8974149091be1f/
and if I fire up a debugger I can see that work_id = None
.
If I try http://localhost:5000/participate/512dc365fe8974149091be1f/512dc365fe8974149091be1f
or http://localhost:5000/participate/512dc365fe8974149091be1f/512dc365fe8974149091be1f/
I get 404.
why is this happening? Is there something I've done wrong with routing rules?
Your second route has a typo in it :)
should be