1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-26 23:27:08 +00:00
plateforme-tfjm2/apps/api/urls.py

27 lines
1.0 KiB
Python
Raw Normal View History

2020-04-30 17:12:15 +00:00
from django.conf.urls import url, include
2020-05-11 12:08:19 +00:00
from rest_framework import routers
2020-05-05 03:57:57 +00:00
2020-05-11 12:08:19 +00:00
from .viewsets import UserViewSet, TeamViewSet, TournamentViewSet, AuthorizationViewSet, MotivationLetterViewSet, \
SolutionViewSet, SynthesisViewSet, PoolViewSet
2020-05-05 02:45:38 +00:00
2020-04-30 17:12:15 +00:00
# Routers provide an easy way of automatically determining the URL conf.
# Register each app API router and user viewset
router = routers.DefaultRouter()
router.register('user', UserViewSet)
router.register('team', TeamViewSet)
router.register('tournament', TournamentViewSet)
router.register('authorization', AuthorizationViewSet)
router.register('motivation_letter', MotivationLetterViewSet)
router.register('solution', SolutionViewSet)
router.register('synthesis', SynthesisViewSet)
2020-05-05 03:57:57 +00:00
router.register('pool', PoolViewSet)
2020-04-30 17:12:15 +00:00
app_name = 'api'
# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
url('^', include(router.urls)),
url('^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
]