-
Notifications
You must be signed in to change notification settings - Fork 699
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
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.
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 |
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.
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, |
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 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
# def get_serializer_class(self): | ||
# if self.action == "list": | ||
# return OrderListSerializer | ||
# | ||
# return OrderSerializer | ||
# |
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 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
# def perform_create(self, serializer): | ||
# serializer.save(user=self.request.user) |
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 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.
cinema_service/settings.py
Outdated
@@ -121,7 +121,7 @@ | |||
|
|||
LANGUAGE_CODE = "en-us" | |||
|
|||
TIME_ZONE = "UTC" | |||
TIME_ZONE = "Europe/Kiev" |
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 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.
No description provided.