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

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

solution #387

wants to merge 3 commits into from

Conversation

Psheiuk-Nazar
Copy link

No description provided.

@Psheiuk-Nazar
Copy link
Author

Знімок екрана 2023-08-02 223704 Знімок екрана 2023-08-02 223712 Знімок екрана 2023-08-02 223721 Знімок екрана 2023-08-02 223640 Знімок екрана 2023-08-02 223647 Знімок екрана 2023-08-02 223655

@Psheiuk-Nazar
Copy link
Author

I made a cycling ref in the pages with detail from cars to driver and driver to cars

CarListView,\
DriverListView,\
CarDetailView, \
DriverDetailView

Choose a reason for hiding this comment

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

Avoid using \ as separator, use parentheses instead.

taxi/views.py Outdated
model = Manufacturer
template_name = "taxi/manufacturer_list.html"
context_object_name = "manufacturer_list"
queryset = Manufacturer.objects.all().order_by("name")

Choose a reason for hiding this comment

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

You can directly use the order_by method without calling .all()

{% block content %}{% endblock %}
{% block content %}


Choose a reason for hiding this comment

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

why do you need these blank lines?

</li>
{% endif %}
</ul>
{% endif %}

Choose a reason for hiding this comment

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

Add a blank line at the end of the file

{% if driver.license_number %} {{ driver.license_number }} {% endif %}
</p>
{% empty %}
<p>No do not have Drivers Sorry :( </p>

Choose a reason for hiding this comment

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

Please correct the punctuation.

{% block content %}
<h1> Information about our <strong>DRIVERS</strong></h1>
<br>
{% if driver_list %}

Choose a reason for hiding this comment

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

What if there are no drivers?

<h1> Manufacturer List</h1>
{% if manufacturer_list %}
<ul>
{% for manuf in manufacturer_list %}

Choose a reason for hiding this comment

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

manufacturer is

Suggested change
{% for manuf in manufacturer_list %}
{% for manufacturer in manufacturer_list %}

{% else %}
<p> The are no manufacturer in Taxi Service</p>
{% endif %}
{% endblock %}

Choose a reason for hiding this comment

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

adjust the indentation of the tags.


{% block content %}
<h3>Information about car: {{ car.model }}</h3><br>
<h4>This cars manufacturer is: {{ car.manufacturer.name }}, from {{ car.manufacturer.country }}</h4>

Choose a reason for hiding this comment

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

Suggested change
<h4>This cars manufacturer is: {{ car.manufacturer.name }}, from {{ car.manufacturer.country }}</h4>
<h4>This car's manufacturer is: {{ car.manufacturer.name }}, from {{ car.manufacturer.country }}</h4>

{% extends 'base.html' %}

{% block content %}
<h3>Information about car: {{ car.model }}</h3><br>

Choose a reason for hiding this comment

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

Suggested change
<h3>Information about car: {{ car.model }}</h3><br>
<h3>Information about the car: {{ car.model }}</h3><br>

Copy link

@Polyakiv-Andrey Polyakiv-Andrey left a comment

Choose a reason for hiding this comment

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

Good job!

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