-
Notifications
You must be signed in to change notification settings - Fork 834
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 #892
base: master
Are you sure you want to change the base?
Solution #892
Conversation
watergor
commented
Dec 22, 2024
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 setting up the Django application! 🎉 While there are a few minor issues, such as the unnecessary fields
attribute in the ManufacturerDeleteView
and some typos in the confirmation messages, these do not critically impact the functionality of your code. Remember to add a Cancel
button in your delete confirmation templates for better user experience. 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! ✨
taxi/views.py
Outdated
class ManufacturerDeleteView(LoginRequiredMixin, generic.DeleteView): | ||
model = Manufacturer | ||
fields = "__all__" |
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 ManufacturerDeleteView
should not have a fields
attribute. The DeleteView
does not require fields to be specified as it does not deal with form submissions in the same way as CreateView
or UpdateView
. You can remove the fields
attribute from this view.
|
||
{% block content%} | ||
<h1>Delete car</h1> | ||
<p>Are you sure wont to delete the car: {{ car }}</p> |
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 typo in the confirmation message: 'wont' should be corrected to 'want'. The line should read: <p>Are you sure you want to delete the car: {{ car }}</p>
.
|
||
{% block content%} | ||
<h1>Delete manufacturer</h1> | ||
<p>Are you sure wont to delete the manufacturer: {{ manufacturer.name }}</p> |
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 typo in the confirmation message: 'wont' should be corrected to 'want'. The line should read: <p>Are you sure you want to delete the manufacturer: {{ manufacturer.name }}</p>
.