Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes


Detailed Description

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='$')

    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.

Definition at line 307 of file

Constructor & Destructor Documentation

Definition at line 326 of file

00327     def __init__(self, rules):
00328         self.rules = list(rules)

Member Function Documentation

def (   self,

Definition at line 329 of file

00330     def __call__(self, *args, **kwargs):
00331         return RuleTemplateFactory(self.rules, dict(*args, **kwargs))

Member Data Documentation

Definition at line 327 of file

The documentation for this class was generated from the following file: