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 #402

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

Solution #402

wants to merge 9 commits into from

Conversation

CaCtUs1k
Copy link

@CaCtUs1k CaCtUs1k commented Sep 25, 2023

image
image
image
image
image
image
image
image
image

Copy link

@KristianYe KristianYe left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines 1 to 9
{% 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 %}

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

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"

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?

Copy link

@Serhii-Leonenko Serhii-Leonenko left a 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"

Choose a reason for hiding this comment

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

what about this?)

Choose a reason for hiding this comment

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

and other similar cases

{{ form|crispy }}
<input class="btn btn-primary" type="submit" value="Submit">
</form>
{% endblock %}

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

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"

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?)

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.

3 participants