aboutsummaryrefslogtreecommitdiffstats
path: root/tutorial/1-serialization.html
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/1-serialization.html')
-rw-r--r--tutorial/1-serialization.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/tutorial/1-serialization.html b/tutorial/1-serialization.html
index 94145642..a94ef276 100644
--- a/tutorial/1-serialization.html
+++ b/tutorial/1-serialization.html
@@ -288,8 +288,8 @@ class Snippet(models.Model):
ordering = ('created',)
</code></pre>
<p>Don't forget to sync the database for the first time.</p>
-<pre class="prettyprint lang-py"><code>python manage.py syncdb
-</code></pre>
+<pre class="prettyprint lang-py"><code>python manage.py makemigrations snippets
+python manage.py migrate</code></pre>
<h2 id="creating-a-serializer-class">Creating a Serializer class</h2>
<p>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 <code>json</code>. We can do this by declaring serializers that work very similar to Django's forms. Create a file in the <code>snippets</code> directory named <code>serializers.py</code> and add the following.</p>
<pre class="prettyprint lang-py"><code>from django.forms import widgets