class documentation

class EndpointPrefix(RuleFactory): (source)

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: str, rules: t.Iterable[RuleFactory]): (source)

Undocumented

def get_rules(self, map: Map) -> t.Iterator[Rule]: (source)

Subclasses of `RuleFactory` have to override this method and return an iterable of rules.

Undocumented

Undocumented