-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhttp_urls.py
33 lines (27 loc) · 899 Bytes
/
http_urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from django.urls import re_path, include
from rest_framework import routers
import inflection
from student_profile.views import (
SocialLinkViewSet,
DragAndDropView,
PublishPageView,
StudentSearchList,
VisibilityView,
)
from student_profile.serializers.generic_serializers import common_dict
app_name = 'student_profile'
router = routers.DefaultRouter()
for model in common_dict:
router.register(
inflection.underscore(model),
common_dict[model]["viewset"],
basename=model,
)
router.register(r'social_link', SocialLinkViewSet, basename="SocialLink")
urlpatterns = [
re_path(r'publish', PublishPageView.as_view()),
re_path(r'rearrange', DragAndDropView.as_view()),
re_path(r'search_students', StudentSearchList.as_view()),
re_path(r'section_visibility', VisibilityView.as_view()),
re_path(r'^', include(router.urls)),
]