diff options
| author | Tom Christie | 2014-11-19 13:06:02 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-11-19 13:06:02 +0000 | 
| commit | 5769306c10a6ad7a809f2e96b1c82dc61935b9eb (patch) | |
| tree | 63a43d913205fe08f94d6b0090cf38a00aecccc9 | |
| parent | 7b2ed10223109f3addd4c68329f6924a64d2acf6 (diff) | |
| download | django-rest-framework-5769306c10a6ad7a809f2e96b1c82dc61935b9eb.tar.bz2 | |
Add migrate command
| -rw-r--r-- | tutorial/1-serialization.html | 4 | 
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 | 
