mirror of
https://github.com/bspeice/UNCCGameDay-Server
synced 2025-12-08 02:58:48 -05:00
Add the API root
This commit is contained in:
@ -4,6 +4,17 @@ from serializers import *
|
||||
from rest_framework.views import APIView
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import status
|
||||
from rest_framework.decorators import api_view
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
@api_view(('GET',))
|
||||
def api_root(request):
|
||||
'Give some information about our API'
|
||||
return Response({
|
||||
'parking_lots': request.build_absolute_uri(reverse('parking-lots')),
|
||||
'parking_rating': request.build_absolute_uri(reverse('parking-rating')),
|
||||
})
|
||||
|
||||
class ParkingLotList(APIView):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user