mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-31 07:57:55 +03:00 
			
		
		
		
	Merge pull request #3162 from lgiordani/fix_tutorial_serializer
Removed import of unused django.forms.widgets
This commit is contained in:
		
						commit
						098ff83eb8
					
				|  | @ -89,7 +89,6 @@ We'll also need to create an initial migration for our snippet model, and sync t | ||||||
| 
 | 
 | ||||||
| The first thing we need to get started on our Web API is to provide a way of serializing and deserializing the snippet instances into representations such as `json`.  We can do this by declaring serializers that work very similar to Django's forms.  Create a file in the `snippets` directory named `serializers.py` and add the following. | The first thing we need to get started on our Web API is to provide a way of serializing and deserializing the snippet instances into representations such as `json`.  We can do this by declaring serializers that work very similar to Django's forms.  Create a file in the `snippets` directory named `serializers.py` and add the following. | ||||||
| 
 | 
 | ||||||
|     from django.forms import widgets |  | ||||||
|     from rest_framework import serializers |     from rest_framework import serializers | ||||||
|     from snippets.models import Snippet, LANGUAGE_CHOICES, STYLE_CHOICES |     from snippets.models import Snippet, LANGUAGE_CHOICES, STYLE_CHOICES | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user