Skip to content

Instantly share code, notes, and snippets.

@saurabh-hirani
Created June 9, 2013 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saurabh-hirani/5743441 to your computer and use it in GitHub Desktop.
Save saurabh-hirani/5743441 to your computer and use it in GitHub Desktop.
def route(self, rule, **options):
def decorator(f):
endpoint = options.pop('endpoint', None)
self.add_url_rule(rule, endpoint, f, **options)
return f
return decorator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment