In Cherrypy it’s possible to do this:
@cherrypy.expose
def default(self, url, *suburl, **kwarg):
pass
Is there a flask equivalent?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is a snippet on Flask’s website about a ‘catch-all’ route for flask. You can find it here.
Basically the decorator works by chaining two URL filters. The example on the page is:
Which would give you: