class documentation

class EndpointPrefix(RuleFactory):

View In Hierarchy

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
def __init__(self, prefix, rules):

Undocumented

Parameters
prefix:strUndocumented
rules:t.Iterable[RuleFactory]Undocumented
def get_rules(self, map):
Subclasses of RuleFactory have to override this method and return an iterable of rules.
Parameters
map:MapUndocumented
Returns
t.Iterator[Rule]Undocumented
prefix =

Undocumented

rules =

Undocumented