Stubs for API head points. To add reverse URLs next.

This commit is contained in:
Michael DeHaan
2013-04-25 12:55:09 -04:00
parent 620ce927a8
commit 5c7cab70b7
2 changed files with 23 additions and 0 deletions

View File

@@ -28,10 +28,27 @@ from rest_framework.response import Response
from rest_framework import status
from rest_framework.settings import api_settings
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.views import APIView
import exceptions
import datetime
import json as python_json
from base_views import *
class ApiRootView(APIView):
def get(self, request, format=None):
data = {}
#data = python_json.dumps(data)
return Response(data)
class ApiV1RootView(APIView):
def get(self, request, format=None):
data = {}
#data = python_json.dumps(data)
return Response(data)
class AuthTokenView(ObtainAuthToken):
renderer_classes = api_settings.DEFAULT_RENDERER_CLASSES