diff options
Diffstat (limited to 'tutorial')
| -rw-r--r-- | tutorial/1-serialization/index.html | 4 | ||||
| -rw-r--r-- | tutorial/2-requests-and-responses/index.html | 4 | ||||
| -rw-r--r-- | tutorial/3-class-based-views/index.html | 4 | ||||
| -rw-r--r-- | tutorial/4-authentication-and-permissions/index.html | 4 | ||||
| -rw-r--r-- | tutorial/5-relationships-and-hyperlinked-apis/index.html | 4 | ||||
| -rw-r--r-- | tutorial/6-viewsets-and-routers/index.html | 8 | ||||
| -rw-r--r-- | tutorial/quickstart/index.html | 4 | 
7 files changed, 30 insertions, 2 deletions
| diff --git a/tutorial/1-serialization/index.html b/tutorial/1-serialization/index.html index 0561fab1..7cb478bd 100644 --- a/tutorial/1-serialization/index.html +++ b/tutorial/1-serialization/index.html @@ -252,6 +252,10 @@                    </li>                    <li > +                    <a href="../../topics/project-management">Project management</a> +                  </li> +                   +                  <li >                      <a href="../../topics/rest-framework-2-announcement">2.0 Announcement</a>                    </li> diff --git a/tutorial/2-requests-and-responses/index.html b/tutorial/2-requests-and-responses/index.html index e9436d2a..f117a9d3 100644 --- a/tutorial/2-requests-and-responses/index.html +++ b/tutorial/2-requests-and-responses/index.html @@ -252,6 +252,10 @@                    </li>                    <li > +                    <a href="../../topics/project-management">Project management</a> +                  </li> +                   +                  <li >                      <a href="../../topics/rest-framework-2-announcement">2.0 Announcement</a>                    </li> diff --git a/tutorial/3-class-based-views/index.html b/tutorial/3-class-based-views/index.html index cf7be3ae..6533945d 100644 --- a/tutorial/3-class-based-views/index.html +++ b/tutorial/3-class-based-views/index.html @@ -252,6 +252,10 @@                    </li>                    <li > +                    <a href="../../topics/project-management">Project management</a> +                  </li> +                   +                  <li >                      <a href="../../topics/rest-framework-2-announcement">2.0 Announcement</a>                    </li> diff --git a/tutorial/4-authentication-and-permissions/index.html b/tutorial/4-authentication-and-permissions/index.html index f4661bde..21e181c5 100644 --- a/tutorial/4-authentication-and-permissions/index.html +++ b/tutorial/4-authentication-and-permissions/index.html @@ -252,6 +252,10 @@                    </li>                    <li > +                    <a href="../../topics/project-management">Project management</a> +                  </li> +                   +                  <li >                      <a href="../../topics/rest-framework-2-announcement">2.0 Announcement</a>                    </li> diff --git a/tutorial/5-relationships-and-hyperlinked-apis/index.html b/tutorial/5-relationships-and-hyperlinked-apis/index.html index 51a66e92..e552c6e4 100644 --- a/tutorial/5-relationships-and-hyperlinked-apis/index.html +++ b/tutorial/5-relationships-and-hyperlinked-apis/index.html @@ -252,6 +252,10 @@                    </li>                    <li > +                    <a href="../../topics/project-management">Project management</a> +                  </li> +                   +                  <li >                      <a href="../../topics/rest-framework-2-announcement">2.0 Announcement</a>                    </li> diff --git a/tutorial/6-viewsets-and-routers/index.html b/tutorial/6-viewsets-and-routers/index.html index 04071f9e..03839e8d 100644 --- a/tutorial/6-viewsets-and-routers/index.html +++ b/tutorial/6-viewsets-and-routers/index.html @@ -252,6 +252,10 @@                    </li>                    <li > +                    <a href="../../topics/project-management">Project management</a> +                  </li> +                   +                  <li >                      <a href="../../topics/rest-framework-2-announcement">2.0 Announcement</a>                    </li> @@ -423,8 +427,8 @@ class SnippetViewSet(viewsets.ModelViewSet):          snippet = self.get_object()          return Response(snippet.highlighted) -    def pre_save(self, obj): -        obj.owner = self.request.user +    def perform_create(self, serializer): +            serializer.save(owner=self.request.user)  </code></pre>  <p>This time we've used the <code>ModelViewSet</code> class in order to get the complete set of default read and write operations.</p>  <p>Notice that we've also used the <code>@detail_route</code> decorator to create a custom action, named <code>highlight</code>.  This decorator can be used to add any custom endpoints that don't fit into the standard <code>create</code>/<code>update</code>/<code>delete</code> style.</p> diff --git a/tutorial/quickstart/index.html b/tutorial/quickstart/index.html index b81e1dc4..0c593f47 100644 --- a/tutorial/quickstart/index.html +++ b/tutorial/quickstart/index.html @@ -252,6 +252,10 @@                    </li>                    <li > +                    <a href="../../topics/project-management">Project management</a> +                  </li> +                   +                  <li >                      <a href="../../topics/rest-framework-2-announcement">2.0 Announcement</a>                    </li> | 
