-
Notifications
You must be signed in to change notification settings - Fork 722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solution #761
base: master
Are you sure you want to change the base?
Solution #761
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on implementing the models, serializers, views, and URL configurations! 🎉 Your code meets all the task requirements and constraints effectively. While your serializers are correctly implemented, consider using serializers.ModelSerializer
for MovieSerializer
and CinemaHallSerializer
in the future to reduce boilerplate code and enhance maintainability. Keep up the excellent work! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
from rest_framework import serializers | ||
|
||
from cinema.models import Movie | ||
from cinema.models import Movie, Genre, Actor, CinemaHall | ||
|
||
|
||
class MovieSerializer(serializers.Serializer): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using serializers.ModelSerializer
for MovieSerializer
to simplify the code. This will automatically generate fields based on the model definition and reduce redundancy.
return instance | ||
|
||
|
||
class CinemaHallSerializer(serializers.Serializer): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using serializers.ModelSerializer
for CinemaHallSerializer
to simplify the code. This will automatically generate fields based on the model definition and reduce redundancy.
No description provided.