sites/irclogs.qmsk.net/urls.py
branchsites
changeset 35 79ea0e2a6cc2
parent 30 a86a25a9f75b
child 36 02d4040d5946
equal deleted inserted replaced
34:09196d5b2a39 35:79ea0e2a6cc2
     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 StaticMapping, map, mapre
    10 from lib.map import StaticMapper, map, mapre
    11 
    11 
    12 def build_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 StaticMapping([
    17     return StaticMapper([
    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