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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Solution #870

wants to merge 1 commit into from

Conversation

CheshireKate
Copy link

Screenshot 2024-11-14 at 13 40 42

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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>

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>

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 %}

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>

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" %}

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.

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.

2 participants