mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-31 16:07:38 +03:00 
			
		
		
		
	Merge pull request #6376 from johnthagen/patch-1
Fix example to be Python 3.x and 2.7 compatible
This commit is contained in:
		
						commit
						5fd12d1b16
					
				|  | @ -22,7 +22,7 @@ To do so, open the Django shell, using `python manage.py shell`, then import the | ||||||
| 
 | 
 | ||||||
|     >>> from myapp.serializers import AccountSerializer |     >>> from myapp.serializers import AccountSerializer | ||||||
|     >>> serializer = AccountSerializer() |     >>> serializer = AccountSerializer() | ||||||
|     >>> print repr(serializer)  # Or `print(repr(serializer))` in Python 3.x. |     >>> print(repr(serializer)) | ||||||
|     AccountSerializer(): |     AccountSerializer(): | ||||||
|         id = IntegerField(label='ID', read_only=True) |         id = IntegerField(label='ID', read_only=True) | ||||||
|         name = CharField(allow_blank=True, max_length=100, required=False) |         name = CharField(allow_blank=True, max_length=100, required=False) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user