Package wtf :: Package app :: Module decorators :: Class Method
[hide private]
[frames] | no frames]

Class Method

source code

object --+
         |
        Method

Decorator which ensures certain HTTP methods
Instance Methods [hide private]
 
__init__(self, *methods, **kwargs)
Initialization
source code
callable
__call__(self, func)
Decorate the callable
source code

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

Instance Variables [hide private]
bool h2g
automatically transform HEAD to GET methods?
set methods
The method set to ensure (set(['method', ...]))
bool options
Should the decorator handle OPTIONS requests?
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *methods, **kwargs)
(Constructor)

source code 
Initialization
Parameters:
  • methods (tuple) - method list to ensure (('method', ...))
  • kwargs (dict) - Behaviour options. The following ones are recognized: bool(handle_options): Should the decorator handle OPTIONS requests (defaults to True); bool(head_to_get): automatically transform HEAD to GET methods (defaults to True)?
Raises:
  • TypeError - Unrecognized keyword arguments presented
Overrides: object.__init__

__call__(self, func)
(Call operator)

source code 
Decorate the callable
Parameters:
  • func (callable) - The callable to decorate
Returns: callable
The decorated callable