mirror of
https://github.com/bspeice/UNCCGameDay-Server
synced 2025-12-08 02:58:48 -05:00
Remove the settings.py file (for security)
Also get the rate lot totally working
This commit is contained in:
@ -8,6 +8,7 @@ from rest_framework.decorators import api_view
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
@api_view(('GET',))
|
||||
def api_root(request):
|
||||
@ -33,7 +34,6 @@ class SingleParkingLotList(APIView):
|
||||
"""
|
||||
|
||||
def get(self, request, lot):
|
||||
print "Received lot: '" + lot + "'"
|
||||
parking_lot = get_object_or_404(ParkingLot, location=lot)
|
||||
return Response(ParkingLotSerializer(parking_lot).data)
|
||||
|
||||
@ -44,6 +44,7 @@ class RateLot(APIView):
|
||||
**POST**: Rate a parking lot
|
||||
"""
|
||||
|
||||
@csrf_exempt
|
||||
def post(self, request):
|
||||
'Rate a parking lot'
|
||||
rating = ParkingRatingSerializer(data=request.DATA)
|
||||
|
||||
Reference in New Issue
Block a user