sites/irclogs.qmsk.net/urls.py
author Tero Marttila <terom@fixme.fi>
Sat, 07 Feb 2009 06:54:52 +0200
branchsites
changeset 30 a86a25a9f75b
parent 29 b06ff4c05d42
child 35 79ea0e2a6cc2
permissions -rw-r--r--
route requests through sites/www.qmsk.net, although still hardcoded

"""
    URL mapping for the irclogs.qmsk.net site
"""

# our own handlers
import handlers

# library stuff
from lib.map import StaticMapping, map, mapre

def build_mapper () :
    """
        Construct and return the Mapping object
    """

    return StaticMapping([
        map(    '/',                                        handlers.index                  ),
        map(    '/channel/%s',                              handlers.channel_view           ),
        mapre(  r'^/channel/(\w+)/last/(\d+)(\.\w+)?',      handlers.channel_last           ),
    ])