class documentation

All URLs provided by this factory have the subdomain set to a specific domain. For example if you want to use the subdomain for the current language this can be a good setup:: url_map = Map([ Rule('/', endpoint='#select_language'), Subdomain('<string(length=2):lang_code>', [ Rule('/', endpoint='index'), Rule('/about', endpoint='about'), Rule('/help', endpoint='help') ]) ]) All the rules except for the ``'#select_language'`` endpoint will now listen on a two letter long subdomain that holds the language code for the current request.

Method __init__ Undocumented
Method get_rules Subclasses of `RuleFactory` have to override this method and return an iterable of rules.
Instance Variable rules Undocumented
Instance Variable subdomain Undocumented
def __init__(self, subdomain: 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

subdomain = (source)

Undocumented