Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Solution #726

wants to merge 7 commits into from

Conversation

sumseer
Copy link

@sumseer sumseer commented Dec 18, 2024

No description provided.

Copy link

@zaietsmo zaietsmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GJ

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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:

  1. ImageField in Movie Model: The ImageField named image in the Movie model should be configured to save images in the format f"{slugify(movie.title)}-{uuid}{ext}". This implementation is missing and needs to be added.

  2. Image Upload Endpoint: The /upload-image/ endpoint for handling image uploads for movies is not present. This functionality is required and should be implemented.

  3. Image Display in Serializers: The Movie and MovieSession serializers should include the image URL in their responses. This is currently not implemented and needs to be corrected.

  4. 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.

@@ -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)

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.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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:

  1. ImageField in Movie Model: Ensure the movie_image_path function is correctly implemented to format the image filename as f"{slugify(movie.title)}-{uuid}{ext}". This is crucial for maintaining a consistent and descriptive file naming convention.

  2. Image Display in Serializers: Double-check that the MovieListSerializer, MovieDetailSerializer, and MovieSessionListSerializer 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! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants