-
Notifications
You must be signed in to change notification settings - Fork 681
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 #726
base: master
Are you sure you want to change the base?
Solution #726
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.
GJ
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.
Thank you for your hard work on this pull request! 😊 While you've made great progress, there are a few critical issues that need to be addressed to meet the task requirements:
-
ImageField in Movie Model: The
ImageField
namedimage
in theMovie
model should be configured to save images in the formatf"{slugify(movie.title)}-{uuid}{ext}"
. This implementation is missing and needs to be added. -
Image Upload Endpoint: The
/upload-image/
endpoint for handling image uploads for movies is not present. This functionality is required and should be implemented. -
Image Display in Serializers: The
Movie
andMovieSession
serializers should include the image URL in their responses. This is currently not implemented and needs to be corrected. -
Custom AuthTokenSerializer: Ensure that the
AuthTokenSerializer
correctly handles token generation using email and password, as required by the task.
These issues impact the core functionality and requirements of the task, so addressing them is crucial. Once these are resolved, your code will be in great shape! Keep up the good work, and don't hesitate to reach out if you need any help. 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
cinema/serializers.py
Outdated
@@ -69,6 +77,7 @@ class MovieSessionListSerializer(MovieSessionSerializer): | |||
source="cinema_hall.capacity", read_only=True | |||
) | |||
tickets_available = serializers.IntegerField(read_only=True) | |||
movie_image = serializers.ImageField(source="movie.title", read_only=True) |
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.
The movie_image
field is incorrectly sourced. It should be source="movie.image"
instead of source="movie.title"
to correctly retrieve the image field from the Movie
model.
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 majority of the task requirements! 🎉 Your code is well-structured, and you've addressed most of the necessary features for the cinema application. However, there are a few areas to focus on for improvement:
-
ImageField in Movie Model: Ensure the
movie_image_path
function is correctly implemented to format the image filename asf"{slugify(movie.title)}-{uuid}{ext}"
. This is crucial for maintaining a consistent and descriptive file naming convention. -
Image Display in Serializers: Double-check that the
MovieListSerializer
,MovieDetailSerializer
, andMovieSessionListSerializer
include the necessary fields to display image URLs. This will enhance the user experience by providing visual context.
Your efforts are commendable, and this approval is to help you move forward with your learning. Please review the comments to refine your code further. Remember, addressing these issues will not only improve your current project but also enhance your coding skills for future tasks. Keep up the great work and continue learning from your experiences! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
No description provided.