See also
Werkzeug — URL Routing
Bases: werkzeug.routing.BaseConverter
This converter accepts Credential types, represented in typeid string:
Rule('/page/<credtype:service>')
Parameters: | map (werkzeug.routing.Map) – the Map |
---|
Bases: werkzeug.exceptions.HTTPException
301 Moved Permanently
The URL to redirect.
Bases: werkzeug.routing.BaseConverter
This converter accepts User objects, represented in id with optional slug generated from name. For example:
123
123/hong.minhee
Actually it does not returns a User object. Instead, it returns a function that returns a User object. So you have to call after give it:
@app.route('/<user:user>')
def profile(user):
user = user()
Parameters: |
|
---|
Warning
It has a lot of side effects about errors and redirections that are unexpected in the design of werkzeug.routing.BaseConverter class. Please be careful!
Whether redirects the user to the canonical url when the request url is not canonical.
Makes a normalized slug for the user.
The dictionary of extended routing converters. It should be registered when the Flask application has created:
app = flask.Flask(__name__)
app.url_map.converters.update(defernia.web.routing.converters)
See also
Attribute flask.Flask.url_map