dr.botzo/dr_botzo/dispatch/urls.py
Brian S. Stephan 4f717cb1c2 dispatch: break Dispatcher actions into 2nd model
decouple the dispatcher (a key, basically) with the actions to take upon
receiving such a message. allows us to have multiple actions for one key
without weird hacks
2015-06-19 11:29:00 -05:00

17 lines
812 B
Python

"""URL patterns for the dispatcher API."""
from django.conf.urls import patterns, url
from dispatch.views import (DispatchMessage, DispatcherList, DispatcherDetail, DispatcherActionList,
DispatcherActionDetail)
urlpatterns = patterns('dispatch.views',
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/actions/$', DispatcherActionList.as_view(), name='dispatch_api_actions'),
url(r'^api/actions/(?P<pk>[0-9]+)/$', DispatcherActionDetail.as_view(), name='dispatch_api_action_detail'),
)