Пример #1
0
 def __init__(self, map, *items):
     BaseConverter.__init__(self, map)
     self.regex = items[0]
Пример #2
0
 def __init__(self, map):
     BaseConverter.__init__(self, map)
     self.regex = '(?:%s)' % '|'.join([re.escape(x) for x in NEWS_URLS])
Пример #3
0
 def __init__(self, map):
     BaseConverter.__init__(self, map)
     self.regex = '\w+(?:-\w+)*'
Пример #4
0
 def __init__(self, url_map):
     BaseConverter.__init__(self, url_map)
     self.regex = (r'(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}'
                   r'==|[A-Za-z0-9_-]{3}=)?')
Пример #5
0
 def __init__(self, url_map):
     BaseConverter.__init__(self, url_map)
     self.regex = r'(?i)(?:WQL)'
Пример #6
0
 def __init__(self, *args, **kwargs):
     BaseConverter.__init__(self, *args, **kwargs)
     self.type_ = "string"
Пример #7
0
 def __init__(self, url_map):
     BaseConverter.__init__(self, url_map)
     self.regex = r'[a-zA-Z_][a-zA-Z0-9_]*'
Пример #8
0
 def __init__(self, map, *args):
     BaseConverter.__init__(self,map)
     self.map = map
     self.regex = args[0]
Пример #9
0
    def __init__(self, url_map, ext):
        BaseConverter.__init__(self, url_map)

        self.regex = '[^/].*?(?:{})'.format(ext)
Пример #10
0
 def __init__(self, url_map):
     BaseConverter.__init__(self, url_map)
     self.regex = '(?:%s)' % '|'.join([re.escape(x) for x in items])
Пример #11
0
 def __init__(self, mapping, *items):
     BaseConverter.__init__(self, mapping)
     # Start by enforcing that x is an integer then convert it to string
     self.regex = '(?:%s)' % '|'.join([str(int(x)) for x in items])
Пример #12
0
 def __init__(self, map, seperator=u'/'):
     BaseConverter.__init__(self, map)
     self.seperator = seperator
Пример #13
0
 def __init__(self, map):
     BaseConverter.__init__(self, map)
     self.regex = '\w+(?:-\w+)*'
Пример #14
0
 def __init__(self, url_map):
     BaseConverter.__init__(self, url_map)
     self.regex = '(?:%s)' % '|'.join([re.escape(x) for x in items])
Пример #15
0
 def __init__(self, map):
     BaseConverter.__init__(self, map)
     self.fixed_digits = 64
Пример #16
0
 def __init__(self, url_map):
     BaseConverter.__init__(self, url_map)
     self.regex = '[^/].*?/'
Пример #17
0
 def __init__(self, map, *items):
     BaseConverter.__init__(self, map)
     self.items = items
Пример #18
0
 def __init__(self, *args, **kwargs):
     BaseConverter.__init__(self, *args, **kwargs)
     self.type_ = "string"
     self.regex = '[^(/;)]+'