2023-06-27 22:57:37 +08:00
|
|
|
from django.urls import include, path
|
2023-10-01 01:24:58 +08:00
|
|
|
from .views import StudyGroupListView, StudyGroupListNearView, StudyGroupCreateView, StudyGroupDetailView, StudyGroupAvatarsView
|
2023-09-26 20:28:59 +08:00
|
|
|
from rest_framework import routers
|
|
|
|
|
|
|
|
router = routers.DefaultRouter()
|
|
|
|
router.register(r'create', StudyGroupCreateView,
|
|
|
|
basename='Create Study Group')
|
2023-06-27 22:57:37 +08:00
|
|
|
|
|
|
|
urlpatterns = [
|
2023-10-01 01:24:58 +08:00
|
|
|
|
2023-06-27 22:57:37 +08:00
|
|
|
path('', StudyGroupListView.as_view()),
|
2023-09-26 20:28:59 +08:00
|
|
|
path('', include(router.urls)),
|
2023-10-01 01:24:58 +08:00
|
|
|
path('near/', StudyGroupListNearView.as_view()),
|
|
|
|
path('member_avatars/', StudyGroupAvatarsView.as_view()),
|
|
|
|
path('<str:name>/', StudyGroupDetailView.as_view()),
|
2023-06-27 22:57:37 +08:00
|
|
|
]
|