svv/urls.py
author Tero Marttila <terom@fixme.fi>
Fri, 07 Jan 2011 03:19:37 +0200
changeset 35 13b5dd3a7a5f
parent 15 e098ee83b363
child 37 eabea2857143
permissions -rw-r--r--
orders: Separate EditOrderView
"""
    App URL maps 
"""

from werkzeug.routing import Map, Rule

# controllers
from svv.controllers import Index 
from svv.customers import CustomersView, CustomerView
from svv.orders import OrdersView, OrderView, EditOrderView, NewOrderView, OrderContractDocument

# map URLs -> AppHandler
URLS = Map((
    Rule('/orders/', endpoint=OrdersView),
    Rule('/orders/new', endpoint=NewOrderView),
    Rule('/orders/<int:id>', endpoint=OrderView),
    Rule('/orders/<int:id>/edit', endpoint=EditOrderView),
    Rule('/orders/<int:id>/Vuokrasopimus.pdf', endpoint=OrderContractDocument),

    Rule('/customers', endpoint=CustomersView),
    Rule('/customers/<int:id>', endpoint=CustomerView),

    # test stuff
    Rule('/', endpoint=Index),
))