django-rest-framework/tests/browsable_api/views.py
2015-06-25 16:55:51 -04:00

15 lines
413 B
Python

from __future__ import unicode_literals
from rest_framework import authentication, renderers
from rest_framework.response import Response
from rest_framework.views import APIView
class MockView(APIView):
authentication_classes = (authentication.SessionAuthentication,)
renderer_classes = (renderers.BrowsableAPIRenderer,)
def get(self, request):
return Response({'a': 1, 'b': 2, 'c': 3})