mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 09:57:55 +03:00 
			
		
		
		
	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})
 |