diff --git a/uncc_gameday/gameday/urls.py b/uncc_gameday/gameday/urls.py index 1d53f26..4fbab24 100644 --- a/uncc_gameday/gameday/urls.py +++ b/uncc_gameday/gameday/urls.py @@ -6,9 +6,9 @@ from rest_framework.urlpatterns import format_suffix_patterns urlpatterns = patterns('gameday.views', url('^$', 'api_root'), url('^lots/$', views.ParkingLotList.as_view(), name='parking-lots'), - url('^lots/(?P\w+)/$', views.SingleParkingLotList.as_view(), name='parking-lot'), url('^lots/rate/$', views.RateLot.as_view(), name='parking-rating'), url('^lots/location/(?P\w+)/$', views.ParkingLotEntrance.as_view(), name='get-location'), + url('^lots/(?P\w+)/$', views.SingleParkingLotList.as_view(), name='parking-lot'), url('^register/(?P\d+)/$', views.ListRegisteredUsers.as_view(), name='get-registered-user'), url('^register/(?P\w+)/(?P\w+)/$', views.ListRegisteredUserByName.as_view(), name='get-registered-user-by-name'), diff --git a/uncc_gameday/gameday/views.py b/uncc_gameday/gameday/views.py index 5dab68c..544608d 100755 --- a/uncc_gameday/gameday/views.py +++ b/uncc_gameday/gameday/views.py @@ -15,10 +15,10 @@ def api_root(request): 'Give some information about our API' return Response({ 'parking_lots': request.build_absolute_uri(reverse('parking-lots')), - 'parking_lot': request.build_absolute_uri(reverse('parking-lot')), + #'parking_lot': request.build_absolute_uri(reverse('parking-lot')), 'parking_rating': request.build_absolute_uri(reverse('parking-rating')), - 'get_registered_user': request.build_absolute_uri(reverse('get-registered-user')), - 'get_registered_user_by_name': request.build_absolute_uri(reverse('get-registered-user-by-name')), + #'get_registered_user': request.build_absolute_uri(reverse('get-registered-user')), + #'get_registered_user_by_name': request.build_absolute_uri(reverse('get-registered-user-by-name')), 'register_user': request.build_absolute_uri(reverse('register-user')) }) @@ -45,7 +45,7 @@ class RateLot(APIView): """ Rate a parking lot **GET**: Get the rating choice options - **POST**: Rate a parking lot + **POST**: Rate a parking lot. Please POST a body similar to: {"rating": , "parking_lot": } """ @csrf_exempt @@ -78,7 +78,7 @@ class RegisterUser(APIView): """ Handle Registration of users **GET**: Get the current information of a registered user by ID - **POST**: Register a new user + **POST**: Register a new user. Please POST the and """ def get(self, request): 'Get the first and last names of all registered users'