class EndpointPrefix(RuleFactory):
Prefixes all endpoints (which must be strings for this factory) with another string. This can be useful for sub applications:
url_map = Map([ Rule('/', endpoint='index'), EndpointPrefix('blog/', [Submount('/blog', [ Rule('/', endpoint='index'), Rule('/entry/<entry_slug>', endpoint='show') ])]) ])
Method | __init__ |
Undocumented |
Method | get​_rules |
Subclasses of RuleFactory have to override this method and return an iterable of rules. |
Instance Variable | prefix |
Undocumented |
Instance Variable | rules |
Undocumented |
Undocumented
Parameters | |
prefix:str | Undocumented |
rules:t.Iterable[ | Undocumented |
werkzeug.routing.RuleFactory.get_rules
RuleFactory
have to override this method and return
an iterable of rules.Parameters | |
map:Map | Undocumented |
Returns | |
t.Iterator[ | Undocumented |