class documentation

class RuleTemplate: (source)

View In Hierarchy

Returns copies of the rules wrapped and expands string templates in the endpoint, rule, defaults or subdomain sections. Here a small example for such a rule template:: from werkzeug.routing import Map, Rule, RuleTemplate resource = RuleTemplate([ Rule('/$name/', endpoint='$name.list'), Rule('/$name/<int:id>', endpoint='$name.show') ]) url_map = Map([resource(name='user'), resource(name='page')]) When a rule template is called the keyword arguments are used to replace the placeholders in all the string parameters.

Method __call__ Undocumented
Method __init__ Undocumented
Instance Variable rules Undocumented
def __call__(self, *args: t.Any, **kwargs: t.Any) -> RuleTemplateFactory: (source)

Undocumented

def __init__(self, rules: t.Iterable[Rule]): (source)

Undocumented

Undocumented