cqtu/api/urls.py

21 lines
813 B
Python
Raw Permalink Normal View History

from django.urls import include, path
2020-02-02 01:48:10 +01:00
from rest_framework import routers
from .views import ContestViewSet, BandViewSet, FrequencyViewSet, EntryCategoryViewSet, ReferenceViewSet, QSOViewSet, \
2020-02-02 02:10:33 +01:00
ShadowCallViewSet, UserProfileViewSet
2020-02-02 01:48:10 +01:00
router = routers.DefaultRouter()
router.register('contests', ContestViewSet)
router.register('bands', BandViewSet)
router.register('frequencies', FrequencyViewSet)
router.register('entrycategories', EntryCategoryViewSet)
router.register('references', ReferenceViewSet)
router.register('qsos', QSOViewSet, basename='qso')
router.register('shadowcalls', ShadowCallViewSet)
2020-02-02 02:10:33 +01:00
router.register('profile', UserProfileViewSet, basename='profile')
2020-02-02 01:48:10 +01:00
urlpatterns = [
path('', include(router.urls)),
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
2020-02-02 01:48:10 +01:00
]