Commit 9d87dbc0 by Carlton Gibson Committed by Tom Christie

Remove Py2/Py3 difference from Example (#4145)

`print` is available as a function on every supported version of Python (2.7+)
parent 9b56dda9
...@@ -452,7 +452,7 @@ To do so, open the Django shell, using `python manage.py shell`, then import the ...@@ -452,7 +452,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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment