Skip to content

Commit

Permalink
Add Author model fields to AuthorSerializer
Browse files Browse the repository at this point in the history
- Imported the Author model into serializers and implemented the AuthorSerializer.
  • Loading branch information
vladyslav-tmf committed Nov 23, 2024
1 parent aefa9f0 commit 4fa5159
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions author/serializers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from rest_framework import serializers

from author.models import Author


class AuthorSerializer(serializers.ModelSerializer):
# write your code here
pass
class Meta:
model = Author
fields = ["first_name", "last_name", "pseudonym", "age", "retired"]

0 comments on commit 4fa5159

Please sign in to comment.