django-rest-framework/tests/browsable_api/views.py

15 lines
413 B
Python
Raw Normal View History

from __future__ import unicode_literals
2015-06-25 23:55:51 +03:00
from rest_framework import authentication, renderers
from rest_framework.response import Response
2015-06-25 23:55:51 +03:00
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})