mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 18:08:03 +03:00 
			
		
		
		
	Update Tutorial - Relationships & Hyperlinked APIs (#7950)
unnecessary import, because it is already added in the previous section
This commit is contained in:
		
							parent
							
								
									e95e91ccf2
								
							
						
					
					
						commit
						cdd53c7de9
					
				| 
						 | 
				
			
			@ -31,7 +31,6 @@ The other thing we need to consider when creating the code highlight view is tha
 | 
			
		|||
Instead of using a concrete generic view, we'll use the base class for representing instances, and create our own `.get()` method.  In your `snippets/views.py` add:
 | 
			
		||||
 | 
			
		||||
    from rest_framework import renderers
 | 
			
		||||
    from rest_framework.response import Response
 | 
			
		||||
 | 
			
		||||
    class SnippetHighlight(generics.GenericAPIView):
 | 
			
		||||
        queryset = Snippet.objects.all()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user