-
Notifications
You must be signed in to change notification settings - Fork 831
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
base: master
Are you sure you want to change the base?
solution #387
Conversation
I made a cycling ref in the pages with detail from cars to driver and driver to cars |
CarListView,\ | ||
DriverListView,\ | ||
CarDetailView, \ | ||
DriverDetailView |
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.
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") |
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.
You can directly use the order_by method without calling .all()
templates/base.html
Outdated
{% block content %}{% endblock %} | ||
{% block content %} | ||
|
||
|
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.
why do you need these blank lines?
templates/includes/pagination.html
Outdated
</li> | ||
{% endif %} | ||
</ul> | ||
{% endif %} |
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.
Add a blank line at the end of the file
templates/taxi/car_detail.html
Outdated
{% if driver.license_number %} {{ driver.license_number }} {% endif %} | ||
</p> | ||
{% empty %} | ||
<p>No do not have Drivers Sorry :( </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.
Please correct the punctuation.
{% block content %} | ||
<h1> Information about our <strong>DRIVERS</strong></h1> | ||
<br> | ||
{% if driver_list %} |
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 if there are no drivers?
<h1> Manufacturer List</h1> | ||
{% if manufacturer_list %} | ||
<ul> | ||
{% for manuf in manufacturer_list %} |
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.
manufacturer is
{% for manuf in manufacturer_list %} | |
{% for manufacturer in manufacturer_list %} | |
{% else %} | ||
<p> The are no manufacturer in Taxi Service</p> | ||
{% endif %} | ||
{% 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.
adjust the indentation of the tags.
templates/taxi/car_detail.html
Outdated
|
||
{% block content %} | ||
<h3>Information about car: {{ car.model }}</h3><br> | ||
<h4>This cars manufacturer is: {{ car.manufacturer.name }}, from {{ car.manufacturer.country }}</h4> |
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.
<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> | |
templates/taxi/car_detail.html
Outdated
{% extends 'base.html' %} | ||
|
||
{% block content %} | ||
<h3>Information about car: {{ car.model }}</h3><br> |
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.
<h3>Information about car: {{ car.model }}</h3><br> | |
<h3>Information about the car: {{ car.model }}</h3><br> | |
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.
Good job!
No description provided.