-
Notifications
You must be signed in to change notification settings - Fork 829
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 #870
base: master
Are you sure you want to change the base?
Solution #870
Conversation
CheshireKate
commented
Nov 14, 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 implementing the task requirements! 🎉 While there are a few minor issues, such as the space in the pagination URL and the need to adjust some template tags, these do not significantly impact the functionality of your code. You've done well in setting up the views, URLs, and templates. Keep up the good work, and consider the feedback for future improvements! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
<ul class="pagination"> | ||
{% if page_obj.has_previous %} | ||
<li class="page-item"> | ||
<a href="?page= {{ page_obj.previous_page_number }}" class="page-link">prev</a> |
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.
Remove the space after =
in the href
attribute to ensure the URL is correctly formed: href="?page={{ page_obj.previous_page_number }}"
.
|
||
{% if page_obj.has_next %} | ||
<li class="page-item"> | ||
<a href="?page= {{ page_obj.next_page_number }}" class="page-link">next</a> |
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.
Remove the space after =
in the href
attribute to ensure the URL is correctly formed: href="?page={{ page_obj.next_page_number }}"
.
{% if car %} | ||
<p>{{ car.manufacturer }}</p> | ||
<div><ul> | ||
{% for driver in car.drivers.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.
Ensure that car.drivers.all
is a valid queryset. Typically, it should be car.drivers.all()
to call the method and retrieve the related objects.
{% block content %} | ||
<ul> | ||
{% for driver in drivers %} | ||
<li><a href="{% url "taxi:driver-list"%}">{{ driver.username}}</a></li> |
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 URL tag should link to the driver detail view, not the driver list. Use {% url 'taxi:driver-detail' driver.id %}
to link to the detail page for each driver.
@@ -0,0 +1 @@ | |||
{% extends "base.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.
Add a {% block content %}
section to display the list of manufacturers. You can iterate over the manufacturers and create a list similar to other list templates.