thinkster-django-angular-tutorial icon indicating copy to clipboard operation
thinkster-django-angular-tutorial copied to clipboard

Chapter 6, Indent def perform_create

Open bradleybossard opened this issue 10 years ago • 0 comments

In Chapter 6, under the section "Making API views for Post objects", the following code should be indented to make it part of the class PostViewSet, otherwsie copying and pasting the code as is does not allow you to create a post

def perform_create(self, serializer): instance = serializer.save(author=self.request.user)

return super(PostViewSet, self).perform_create(serializer)

bradleybossard avatar Feb 05 '15 04:02 bradleybossard