Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Static Public Attributes
MoinMoin.support.werkzeug.routing.UnicodeConverter Class Reference
Inheritance diagram for MoinMoin.support.werkzeug.routing.UnicodeConverter:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.werkzeug.routing.UnicodeConverter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def to_python
def to_url

Public Attributes

 regex
 map

Static Public Attributes

 is_greedy = False
int weight = 100

Detailed Description

This converter is the default converter and accepts any string but
only one one path segment.  Thus the string can not include a slash.

This is the default validator.

Example::

    Rule('/pages/<page>'),
    Rule('/<string(length=2):lang_code>')

:param map: the :class:`Map`.
:param minlength: the minimum length of the string.  Must be greater
                  or equal 1.
:param maxlength: the maximum length of the string.
:param length: the exact length of the string.

Definition at line 754 of file routing.py.


Constructor & Destructor Documentation

def MoinMoin.support.werkzeug.routing.UnicodeConverter.__init__ (   self,
  map,
  minlength = 1,
  maxlength = None,
  length = None 
)

Definition at line 772 of file routing.py.

00772 
00773     def __init__(self, map, minlength=1, maxlength=None, length=None):
00774         BaseConverter.__init__(self, map)
00775         if length is not None:
00776             length = '{%d}' % int(length)
00777         else:
00778             if maxlength is None:
00779                 maxlength = ''
00780             else:
00781                 maxlength = int(maxlength)
00782             length = '{%s,%s}' % (
00783                 int(minlength),
00784                 maxlength
00785             )
00786         self.regex = '[^/]' + length
00787 


Member Function Documentation

def MoinMoin.support.werkzeug.routing.BaseConverter.to_python (   self,
  value 
) [inherited]

Reimplemented in MoinMoin.support.werkzeug.routing.NumberConverter.

Definition at line 747 of file routing.py.

00747 
00748     def to_python(self, value):
00749         return value

def MoinMoin.support.werkzeug.routing.BaseConverter.to_url (   self,
  value 
) [inherited]

Reimplemented in MoinMoin.support.werkzeug.routing.NumberConverter.

Definition at line 750 of file routing.py.

00750 
00751     def to_url(self, value):
00752         return url_quote(value, self.map.charset)
00753 

Here is the call graph for this function:


Member Data Documentation

Reimplemented in MoinMoin.support.werkzeug.routing.PathConverter.

Definition at line 741 of file routing.py.

Definition at line 745 of file routing.py.

Reimplemented from MoinMoin.support.werkzeug.routing.BaseConverter.

Definition at line 785 of file routing.py.

Reimplemented in MoinMoin.support.werkzeug.routing.PathConverter.

Definition at line 742 of file routing.py.


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