thinkster-django-angular-tutorial
thinkster-django-angular-tutorial copied to clipboard
Chapter 6, Indent def perform_create
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)