Back to index

moin  1.9.0~rc2
Properties | Private Member Functions
MoinMoin.support.werkzeug.contrib.wrappers.RoutingArgsRequestMixin Class Reference

List of all members.

Properties

 routing_args
 routing_vars

Private Member Functions

def _get_routing_args
def _set_routing_args
def _get_routing_vars
def _set_routing_vars

Detailed Description

This request mixin adds support for the wsgiorg routing args
`specification`_.

.. _specification: http://www.wsgi.org/wsgi/Specifications/routing_args

Definition at line 85 of file wrappers.py.


Member Function Documentation

Definition at line 92 of file wrappers.py.

00092 
00093     def _get_routing_args(self):
00094         return self.environ.get('wsgiorg.routing_args', (()))[0]

Definition at line 106 of file wrappers.py.

00106 
00107     def _get_routing_vars(self):
00108         rv = self.environ.get('wsgiorg.routing_args')
00109         if rv is not None:
00110             return rv[1]
00111         rv = {}
00112         if not self.shallow:
00113             self.routing_vars = rv
00114         return rv

Definition at line 95 of file wrappers.py.

00095 
00096     def _set_routing_args(self, value):
00097         if self.shallow:
00098             raise RuntimeError('A shallow request tried to modify the WSGI '
00099                                'environment.  If you really want to do that, '
00100                                'set `shallow` to False.')
00101         self.environ['wsgiorg.routing_args'] = (value, self.routing_vars)

Definition at line 115 of file wrappers.py.

00115 
00116     def _set_routing_vars(self, value):
00117         if self.shallow:
00118             raise RuntimeError('A shallow request tried to modify the WSGI '
00119                                'environment.  If you really want to do that, '
00120                                'set `shallow` to False.')
00121         self.environ['wsgiorg.routing_args'] = (self.routing_args, value)


Property Documentation

Initial value:
property(_get_routing_args, _set_routing_args, doc='''
    The positional URL arguments as `tuple`.''')

Definition at line 102 of file wrappers.py.

Initial value:
property(_get_routing_vars, _set_routing_vars, doc='''
    The keyword URL arguments as `dict`.''')

Definition at line 122 of file wrappers.py.


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