2016-03-30 17:08:01 -05:00
|
|
|
"""URL patterns for the karma views."""
|
2023-02-16 00:04:25 -06:00
|
|
|
from django.conf.urls import include
|
2023-03-07 15:03:41 -06:00
|
|
|
from django.urls import path, re_path
|
2016-05-13 22:19:38 -05:00
|
|
|
from rest_framework.routers import DefaultRouter
|
2016-03-30 17:08:01 -05:00
|
|
|
|
2023-02-16 00:04:25 -06:00
|
|
|
from karma.views import KarmaKeyViewSet, index, key_detail
|
2016-05-13 22:19:38 -05:00
|
|
|
|
|
|
|
router = DefaultRouter()
|
|
|
|
router.register(r'keys', KarmaKeyViewSet)
|
2016-03-30 17:08:01 -05:00
|
|
|
|
2017-02-06 22:58:51 -06:00
|
|
|
urlpatterns = [
|
2023-02-16 00:04:25 -06:00
|
|
|
path('', index, name='karma_index'),
|
2023-03-27 14:20:07 -05:00
|
|
|
re_path(r'^key/(?P<karma_key>.+)/', key_detail, name='karma_key_detail'),
|
2016-05-13 22:19:38 -05:00
|
|
|
|
2023-02-16 00:04:25 -06:00
|
|
|
path('api/', include(router.urls)),
|
2017-02-06 22:58:51 -06:00
|
|
|
]
|