sites/irclogs.qmsk.net/urls.py
branchsites
changeset 30 a86a25a9f75b
parent 29 b06ff4c05d42
child 35 79ea0e2a6cc2
equal deleted inserted replaced
29:b06ff4c05d42 30:a86a25a9f75b
     5 
     5 
     6 # our own handlers
     6 # our own handlers
     7 import handlers
     7 import handlers
     8 
     8 
     9 # library stuff
     9 # library stuff
    10 from lib.map import Mapping, map, mapre
    10 from lib.map import StaticMapping, map, mapre
    11 
    11 
    12 def url_mapper () :
    12 def build_mapper () :
    13     """
    13     """
    14         Construct and return the Mapping object
    14         Construct and return the Mapping object
    15     """
    15     """
    16 
    16 
    17     return Mapping(
    17     return StaticMapping([
    18         map(    '/',                                        handlers.index                  ),
    18         map(    '/',                                        handlers.index                  ),
    19         map(    '/channel/%s',                              handlers.channel_view           ),
    19         map(    '/channel/%s',                              handlers.channel_view           ),
    20         mapre(  r'^/channel/(\w+)/last/(\d+)(\.\w+)?',      handlers.channel_last           ),
    20         mapre(  r'^/channel/(\w+)/last/(\d+)(\.\w+)?',      handlers.channel_last           ),
    21     )
    21     ])
    22 
    22