-
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
add solution for task #776
base: master
Are you sure you want to change the base?
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.
Hello! 😊 It looks like you've done a great job overall, but there's a small issue that needs to be addressed before we can approve the pull request. The urls.py
file currently registers the MovieViewSet
with the route "buses", which doesn't align with the task requirements. This should be updated to "movies" to ensure the correct functionality and meet the core requirements of the task. Once this change is made, your code should be good to go! Keep up the great work, and feel free 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/urls.py
Outdated
from cinema.views import MovieViewSet | ||
|
||
router = routers.DefaultRouter() | ||
router.register("buses", MovieViewSet) |
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 route is registered with the name 'buses', which seems incorrect for the MovieViewSet
. Consider changing 'buses' to something more appropriate like 'movies'.
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 task requirements! 🎉 Your code is well-structured and aligns with the specifications. Here are a few points to consider for improvement:
- Serializers: While your
MovieSerializer
is correctly implemented using theSerializer
class, consider usingModelSerializer
to simplify your code and maintain consistency with other serializers. This change will automatically handle thecreate
andupdate
methods, reducing boilerplate code.
Overall, your models, views, and URLs are well-defined and correctly implemented. Keep up the good work! Remember to review the comments to enhance your code further. This decision is made to help you move forward with your learning journey. 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
@@ -1,6 +1,6 @@ | |||
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 ModelSerializer
for MovieSerializer
to simplify the code and maintain consistency with other serializers. This will automatically handle the create
and update
methods and reduce boilerplate code.
No description provided.