Last active
December 19, 2015 17:28
-
-
Save saurabh-hirani/5990909 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add_url_rule(self, rule, endpoint=None, view_func=None, **options): | |
"""Connects a URL rule. Works exactly like the :meth:`route` | |
decorator. If a view_func is provided it will be registered with the | |
endpoint. | |
Basically this example:: | |
@app.route('/') | |
def index(): | |
pass | |
Is equivalent to the following:: | |
def index(): | |
pass | |
app.add_url_rule('/', 'index', index) | |
If the view_func is not provided you will need to connect the endpoint | |
to a view function like so:: | |
app.view_functions['index'] = index | |
..... | |
..... | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment