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

Class ResolverInterface

source code

object --+
         |
        ResolverInterface

URL resolver interface

The resoling methods return callables, which take two parameters: request and response, which in turn are instances of wtf.app.request.Request and wtf.app.response.Response.

Instance Methods [hide private]
any
error(self, status, default=None)
Resolve an HTTP status code to a handler callable
source code
callable
resolve(self, request)
Resolve the request url to a python callable
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

error(self, status, default=None)

source code 
Resolve an HTTP status code to a handler callable
Parameters:
  • status (int) - The HTTP status code
  • default (any) - The default, if no callable if assigned
Returns: any
The resolved callable or default

resolve(self, request)

source code 
Resolve the request url to a python callable
Parameters:
Returns: callable
The request/response handle
Raises: