2018-09-25 20:52:38 +00:00
|
|
|
from .views import *
|
|
|
|
from django.urls import path, re_path
|
2018-09-16 16:52:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
2018-09-25 20:52:38 +00:00
|
|
|
# /api/postings/reviews/ Lists all review objects.
|
|
|
|
path('reviews/', ReviewsView.as_view(), name='reviews'),
|
|
|
|
# /api/postings/reviews/1/ Returns data for one Review.
|
|
|
|
path('reviews/<int:pk>', ReviewView.as_view(), name='review'),
|
2018-09-16 16:52:23 +00:00
|
|
|
|
2018-10-10 14:27:04 +00:00
|
|
|
path('reviews/<int:review_id>/helpful_vote/', review_helpful_vote, name='review_helpful_vote'),
|
|
|
|
|
2018-09-25 20:52:38 +00:00
|
|
|
# /api/postings/universities/ Lists all university objects.
|
|
|
|
path('universities/', UniversitiesView.as_view(), name='universities'),
|
|
|
|
# /api/postings/universities/1/ Returns data for one University.
|
|
|
|
path('universities/<int:pk>', UniversityView.as_view(), name='university'),
|
|
|
|
|
|
|
|
# /api/postings/courses/ Lists all course objects.
|
|
|
|
path('courses/', CoursesView.as_view(), name='courses'),
|
|
|
|
# /api/postings/courses/1/ Returns data for one Course.
|
|
|
|
path('courses/<int:pk>', CourseView.as_view(), name='course'),
|
|
|
|
|
|
|
|
# /api/postings/professors/ Lists all professor objects.
|
|
|
|
path('professors/', ProfessorsView.as_view(), name='professors'),
|
|
|
|
# /api/postings/professors/1/ Returns data for one Professor.
|
|
|
|
path('professors/<int:pk>', ProfessorView.as_view(), name='professor'),
|
|
|
|
|
|
|
|
# Deprecated
|
2018-09-16 16:52:23 +00:00
|
|
|
re_path(r'^(?P<pk>\d+)/$', UniReviewRudView.as_view(), name='post-rud'),
|
|
|
|
re_path(r'^$', UniReviewAPIView.as_view(), name='post-create')
|
|
|
|
]
|