mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 04:07:39 +03:00
0407a0df8a
Thanks to Jon Dufresne (@jdufresne) for review. Co-authored-by: Asif Saif Uddin <auvipy@gmail.com> Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com>
12 lines
394 B
Python
12 lines
394 B
Python
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, renderers.JSONRenderer)
|
|
|
|
def get(self, request):
|
|
return Response({'a': 1, 'b': 2, 'c': 3})
|