-
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 #402
base: master
Are you sure you want to change the base?
Solution #402
Conversation
CaCtUs1k
commented
Sep 25, 2023
•
edited
Loading
edited
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.
LGTM!
{% extends "base.html" %} | ||
{% block content %} | ||
<h1>Delete car</h1> | ||
<p>Are you sure you want to delete the car: {{ car.model }}?</p> | ||
<form action="" method="post"> | ||
{% csrf_token %} | ||
<input type="submit" value="Yes!" class="btn btn-danger"> | ||
</form> | ||
{% endblock %} |
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.
Don't forget about blank line, also you have to read the checklist
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 same in other similar cases
taxi/views.py
Outdated
model = Manufacturer | ||
fields = "__all__" | ||
success_url = reverse_lazy("taxi:manufacturer-list") | ||
template_name = "taxi/manufacturer_form.html" |
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.
Do you need to redefine the template name?
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.
Please, check your code before request the review
taxi/views.py
Outdated
model = Car | ||
fields = "__all__" | ||
success_url = reverse_lazy("taxi:car-list") | ||
template_name = "taxi/car_form.html" |
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.
what about this?)
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.
and other similar cases
templates/taxi/car_form.html
Outdated
{{ form|crispy }} | ||
<input class="btn btn-primary" type="submit" value="Submit"> | ||
</form> | ||
{% endblock %} |
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.
and you forget blank line here
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.
and not only here
taxi/views.py
Outdated
|
||
class ManufacturerDeleteView(LoginRequiredMixin, generic.DeleteView): | ||
model = Manufacturer | ||
template_name = "taxi/manufacturer_confirm_delete.html" |
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.
what about _confirm_delete templates, which default name Django use for them?)