dr.botzo/karma/urls.py

20 lines
596 B
Python

"""URL patterns for the karma views."""
from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
from karma.views import key_detail, IndexView, KarmaKeyViewSet, KarmaKeyListJson
router = DefaultRouter()
router.register(r'keys', KarmaKeyViewSet)
urlpatterns = [
url(r'^$', IndexView.as_view(), name='karma_index'),
url(r'^key/(?P<karma_key>.+)/', key_detail, name='karma_key_detail'),
url(r'^api/', include(router.urls)),
# json pages for DataTables
url(r'^datatables/key/$', KarmaKeyListJson.as_view(), name='karma_key_data_tables'),
]