urls.py 1.02 KB
Newer Older
Dalahro's avatar
Dalahro committed
1 2 3 4 5 6
from django.conf.urls import url

from . import views

urlpatterns = [
    url(r'^$', views.index, name='index'),
Dalahro's avatar
Dalahro committed
7
    url(r'^new_switch/$', views.new_switch, name='new-switch'),
chirac's avatar
chirac committed
8 9 10 11
    url(r'^index_room/$', views.index_room, name='index-room'),
    url(r'^new_room/$', views.new_room, name='new-room'),
    url(r'^edit_room/(?P<room_id>[0-9]+)$', views.edit_room, name='edit-room'),
    url(r'^del_room/(?P<room_id>[0-9]+)$', views.del_room, name='del-room'),
Dalahro's avatar
Dalahro committed
12
    url(r'^switch/(?P<switch_id>[0-9]+)$', views.index_port, name='index-port'),
13 14 15
    url(r'^history/(?P<object>switch)/(?P<id>[0-9]+)$', views.history, name='history'),
    url(r'^history/(?P<object>port)/(?P<id>[0-9]+)$', views.history, name='history'),
    url(r'^history/(?P<object>room)/(?P<id>[0-9]+)$', views.history, name='history'),
Dalahro's avatar
Dalahro committed
16
    url(r'^edit_port/(?P<port_id>[0-9]+)$', views.edit_port, name='edit-port'),
Dalahro's avatar
Dalahro committed
17 18
    url(r'^new_port/(?P<switch_id>[0-9]+)$', views.new_port, name='new-port'),
    url(r'^edit_switch/(?P<switch_id>[0-9]+)$', views.edit_switch, name='edit-switch'),
Dalahro's avatar
Dalahro committed
19 20
]