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 "py-token-authentication" #658

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

Conversation

Olga-Gynguliak
Copy link

No description provided.

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 your project! 🎉 While there are a few minor issues, such as commented-out code and a syntax error in the import statement, these don't critically impact the overall functionality or security of your application. Make sure to address these minor issues to enhance your code quality and maintainability. Keep up the good work, and happy coding! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

@@ -0,0 +1,13 @@
from rest_framework.permissions import BasePermission, SAFE_METHODS

Choose a reason for hiding this comment

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

There is a syntax error in the import statement. The correct syntax should be from rest_framework.permissions import BasePermission, SAFE_METHODS. The / character is not valid here and should be removed.

cinema/views.py Outdated
@@ -17,28 +18,39 @@
MovieSessionDetailSerializer,
MovieListSerializer,
OrderSerializer,
OrderListSerializer,
# OrderListSerializer,

Choose a reason for hiding this comment

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

The OrderListSerializer is commented out in the import section. If this serializer is intended to be used, ensure that it is properly defined and uncommented where necessary.

cinema/views.py Outdated
Comment on lines 147 to 152
# def get_serializer_class(self):
# if self.action == "list":
# return OrderListSerializer
#
# return OrderSerializer
#

Choose a reason for hiding this comment

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

The get_serializer_class method for the OrderViewSet is commented out. If you intend to use different serializers for different actions, consider uncommenting and implementing this method.

cinema/views.py Outdated
Comment on lines 153 to 154
# def perform_create(self, serializer):
# serializer.save(user=self.request.user)

Choose a reason for hiding this comment

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

The perform_create method is commented out. If you need to automatically associate the order with the current user upon creation, consider uncommenting and using this method.

@@ -121,7 +121,7 @@

LANGUAGE_CODE = "en-us"

TIME_ZONE = "UTC"
TIME_ZONE = "Europe/Kiev"

Choose a reason for hiding this comment

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

The TIME_ZONE is set to Europe/Kiev. Ensure this is the desired timezone for your application. If the application is intended for a different region, consider updating this setting.

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.

2 participants