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

Like `Subdomain` but prefixes the URL rule with a given string::

    url_map = Map([
        Rule('/', endpoint='index'),
        Submount('/blog', [
            Rule('/', endpoint='blog/index'),
            Rule('/entry/<entry_slug>', endpoint='blog/show')

Now the rule ``'blog/show'`` matches ``/blog/entry/<entry_slug>``.

Definition at line 258 of file

Constructor & Destructor Documentation

def (   self,

Definition at line 272 of file

00273     def __init__(self, path, rules):
00274         self.path = path.rstrip('/')
00275         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 276 of file

00277     def get_rules(self, map):
00278         for rulefactory in self.rules:
00279             for rule in rulefactory.get_rules(map):
00280                 rule.rule = self.path + rule.rule
00281                 yield rule

Member Data Documentation

Definition at line 273 of file

Definition at line 274 of file

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