Package wtf :: Package app :: Module resolver :: Class MapResolver
[hide private]
[frames] | no frames]

Class MapResolver

source code

object --+
         |
        MapResolver

Map based URL resolver class

The class takes a python package, which will be inspected and searched in public modules (not starting with _) for the following variables:

All of these variables are optional. Conflict resolution rules are as follows:

The actual resolver (resolve) works as follows:

Instance Methods [hide private]
 
__init__(self, config, opts, args)
Initialization
source code
 
error(self, status, default=None)
Resolve error code
source code
 
resolve(self, request)
Resolve this request
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __implements__ = [<class 'wtf.app.resolver.ResolverInterface'>]
Instance Variables [hide private]
list _dynamicmap
final dynamic map
dict _errormap
final error map
dict _staticmap
final static URL map
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, config, opts, args)
(Constructor)

source code 
Initialization
Parameters:
  • config (wtf.config.Config) - Configuration
  • opts (optparse.OptionContainer) - Command line arguments
  • args (list) - Positioned command line arguments
Overrides: object.__init__