How a simple code like this isn't working?
What am I doing wrong here?
class ArticleSerializer(ModelSerializer):
class Meta:
model = 'ihr.Article'
publish_fields = ('quote',)
class LiveUpdateSerializer(ModelSerializer):
articles = ArticleSerializer
class Meta:
model = 'ihr.LiveUpdate'
publish_fields = ('title', 'articles')
How a simple code like this isn't working? What am I doing wrong here?
Doing with Django shell
throws:
AttributeError: type object 'LiveUpdate' has no attribute 'articles'