from .views import * from django.urls import path, re_path urlpatterns = [ # /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/', ReviewView.as_view(), name='review'), path('reviews//helpful_vote/', review_helpful_vote, name='review_helpful_vote'), # /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/', 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/', 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/', ProfessorView.as_view(), name='professor'), # Deprecated re_path(r'^(?P\d+)/$', UniReviewRudView.as_view(), name='post-rud'), re_path(r'^$', UniReviewAPIView.as_view(), name='post-create') ]