Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes Class Reference
Inheritance diagram for
Inheritance graph
Collaboration diagram for
Collaboration graph

List of all members.

Public Member Functions

def __init__
def get_rules

Public Attributes


Detailed Description

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

Definition at line 283 of file

Constructor & Destructor Documentation

def (   self,

Definition at line 296 of file

00297     def __init__(self, prefix, rules):
00298         self.prefix = prefix
00299         self.rules = rules

Member Function Documentation

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

Reimplemented from

Definition at line 300 of file

00301     def get_rules(self, map):
00302         for rulefactory in self.rules:
00303             for rule in rulefactory.get_rules(map):
00304                 rule.endpoint = self.prefix + rule.endpoint
00305                 yield rule

Member Data Documentation

Definition at line 297 of file

Definition at line 298 of file

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