dr.botzo/dispatch/urls.py
Brian S. Stephan 8f8af4e6b4 package updates and resulting compat stuff
changes to urls.py in the django views, trivial __init__ change for the
irc library stuff

bss/dr.botzo#16
2017-02-06 22:58:51 -06:00

21 lines
1.1 KiB
Python

"""URL patterns for the dispatcher API."""
from django.conf.urls import url
from dispatch.views import (DispatchMessage, DispatchMessageByKey, DispatcherList, DispatcherDetail,
DispatcherDetailByKey, DispatcherActionList, DispatcherActionDetail)
urlpatterns = [
url(r'^api/dispatchers/$', DispatcherList.as_view(), name='dispatch_api_dispatchers'),
url(r'^api/dispatchers/(?P<pk>[0-9]+)/$', DispatcherDetail.as_view(), name='dispatch_api_dispatcher_detail'),
url(r'^api/dispatchers/(?P<pk>[0-9]+)/message$', DispatchMessage.as_view(), name='dispatch_api_dispatch_message'),
url(r'^api/dispatchers/(?P<key>[A-Za-z-]+)/$', DispatcherDetailByKey.as_view(),
name='dispatch_api_dispatcher_detail'),
url(r'^api/dispatchers/(?P<key>[A-Za-z-]+)/message$', DispatchMessageByKey.as_view(),
name='dispatch_api_dispatch_message'),
url(r'^api/actions/$', DispatcherActionList.as_view(), name='dispatch_api_actions'),
url(r'^api/actions/(?P<pk>[0-9]+)/$', DispatcherActionDetail.as_view(), name='dispatch_api_action_detail'),
]