17 lines
471 B
Python
17 lines
471 B
Python
"""URL patterns for the karma views."""
|
|
from django.conf.urls import include
|
|
from django.urls import path, re_path
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from karma.views import KarmaKeyViewSet, index, key_detail
|
|
|
|
router = DefaultRouter()
|
|
router.register(r'keys', KarmaKeyViewSet)
|
|
|
|
urlpatterns = [
|
|
path('', index, name='karma_index'),
|
|
re_path(r'^key/(?P<karma_key>.+)/', key_detail, name='karma_key_detail'),
|
|
|
|
path('api/', include(router.urls)),
|
|
]
|