Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes Class Reference

List of all members.

Public Member Functions

def lookup

Static Public Attributes

 read_only = True

Detailed Description

Maps request attributes to environment variables. This works not only
for the Werzeug request object, but also any other class with an
environ attribute:

>>> class Test(object):
...     environ = {'key': 'value'}
...     test = environ_property('key')
>>> var = Test()
>>> var.test

If you pass it a second value it's used as default if the key does not
exist, the third one can be a converter that takes a value and converts
it.  If it raises :exc:`ValueError` or :exc:`TypeError` the default value
is used. If no default value is provided `None` is used.

Per default the property is read only.  You have to explicitly enable it
by passing ``read_only=False`` to the constructor.

Definition at line 691 of file

Member Function Documentation

Definition at line 714 of file

00715     def lookup(self, obj):
00716         return obj.environ

Here is the caller graph for this function:

Member Data Documentation

Definition at line 712 of file

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