-
Notifications
You must be signed in to change notification settings - Fork 859
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
Finished #917
base: master
Are you sure you want to change the base?
Finished #917
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 the implementation! 🎉 The code is well-structured and follows the necessary conventions. While there are a few minor suggestions for improvement, they don't impact the functionality. Keep up the good work and consider the feedback for future enhancements!
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
class Meta: | ||
ordering = ["-created_at"] |
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 'class Meta' should be placed after all the attributes of the class are defined. This is correct in this case, but make sure to follow this pattern consistently.
@@ -1,6 +1,6 @@ | |||
from django.db.models import QuerySet | |||
|
|||
from db.models import MovieSession | |||
from db.models import MovieSession, Ticket |
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 double quotes for consistency in the import statement, as per the code style checklist.
from django.db import transaction | ||
from django.utils import timezone | ||
from django.core.exceptions import ObjectDoesNotExist | ||
from db.models import Order, Ticket, MovieSession, 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.
It's recommended to use get_user_model()
instead of directly importing User
. This aligns with the checklist item: 'Use get_user_model()
instead of User
, it is the best practice.'
from django.contrib.auth import get_user_model | ||
from django.core.exceptions import ObjectDoesNotExist | ||
|
||
User = get_user_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.
According to the checklist, you should use get_user_model()
directly instead of assigning it to User
. This is to ensure that the most current user model is always used.
No description provided.