diff options
| author | Tom Christie | 2014-11-27 11:01:21 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-11-27 11:01:21 +0000 | 
| commit | 9defb5ee9f0090f98fa579f1e74b7dfdd6138744 (patch) | |
| tree | ebf35f478a37ded9c7150a0c0bf798386763974f /tutorial | |
| parent | 24dd7466a4f452a522a6fad77c6d2ae073e709e5 (diff) | |
| download | django-rest-framework-9defb5ee9f0090f98fa579f1e74b7dfdd6138744.tar.bz2 | |
Update documentation
Diffstat (limited to 'tutorial')
| -rw-r--r-- | tutorial/1-serialization/index.html | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/tutorial/1-serialization/index.html b/tutorial/1-serialization/index.html index ae558ebc..acdb0893 100644 --- a/tutorial/1-serialization/index.html +++ b/tutorial/1-serialization/index.html @@ -563,7 +563,7 @@ Open the file <code>snippets/serializers.py</code> again, and edit the <code>Sni          model = Snippet          fields = ('id', 'title', 'code', 'linenos', 'language', 'style')  </code></pre> -<p>Once nice property that serializers have is that you can inspect all the fields an serializer instance, by printing it's representation. Open the Django shell with <code>python manange.py shell</code>, then try the following:</p> +<p>One nice property that serializers have is that you can inspect all the fields in a serializer instance, by printing it's representation. Open the Django shell with <code>python manange.py shell</code>, then try the following:</p>  <pre><code>>>> from snippets.serializers import SnippetSerializer  >>> serializer = SnippetSerializer()  >>> print repr(serializer)  # In python 3 use `print(repr(serializer))` @@ -575,7 +575,7 @@ SnippetSerializer():      language = ChoiceField(choices=[('Clipper', 'FoxPro'), ('Cucumber', 'Gherkin'), ('RobotFramework', 'RobotFramework'), ('abap', 'ABAP'), ('ada', 'Ada')...      style = ChoiceField(choices=[('autumn', 'autumn'), ('borland', 'borland'), ('bw', 'bw'), ('colorful', 'colorful')...  </code></pre> -<p>It's important to remember that <code>ModelSerializer</code> classes don't do anything particularly magically, they are simply a shortcut to creating a serializer class with:</p> +<p>It's important to remember that <code>ModelSerializer</code> classes don't do anything particularly magical, they are simply a shortcut for creating serializer classes:</p>  <ul>  <li>An automatically determined set of fields.</li>  <li>Simple default implementations for the <code>create()</code> and <code>update()</code> methods.</li> | 
