thinkster-django-angular-tutorial
thinkster-django-angular-tutorial copied to clipboard
Chapter 06, import Account -> import AccountSerializer
In the following code snippet under the section "Serializing the Post Model", the line
from authentication.serializers import Account
should be
from authentication.serializers import AccountSerializer
Otherwise, the file causes an error
from rest_framework import serializers
from authentication.serializers import Account from posts.models import Post
class PostSerializer(serializers.ModelSerializer): author = AccountSerializer(read_only=True, required=False) ...