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

D-taxi-service-authentication #807

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

Conversation

DOLC3-GABBANA
Copy link

Login page

Screenshot_1

Home page

Screenshot_2

Logout page

Screenshot_3

Manufacturers page

Screenshot_4

Cars page

Screenshot_5

Drivers page

Screenshot_6

User page

Screenshot_7

taxi/urls.py Outdated
index,
CarListView,
CarDetailView,
DriverListView,
DriverDetailView,
ManufacturerListView,
user_logout

Choose a reason for hiding this comment

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

This file shouldn't me modified at all.
You already use build-in authentification methods by including
path("accounts/", include("django.contrib.auth.urls"))

taxi/views.py Outdated
num_visits = request.session.get("num_visits", 0)
request.session["num_visits"] = num_visits + 1

request.session.save()

Choose a reason for hiding this comment

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

Remove this

Copy link
Author

Choose a reason for hiding this comment

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

why? this code responsible for the counter of visits

taxi/urls.py Outdated
@@ -1,6 +1,8 @@
from argparse import Namespace

Choose a reason for hiding this comment

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

Remove all changes from this file
There no need Namespace, auth_views, defining path for logout or login. Just revert all changes in this file

Comment on lines 13 to 34
<div class="container-fluid">
<div class="row">
<div class="col-sm-2">
{% block sidebar %}
{% include "includes/sidebar.html" %}
{% endblock %}
</div>
<div class="col-sm-10 ">
{% if user.is_authenticated %}
<p>Welcome, {{ user.username }}!</p>
<a href="{% url 'logout' %}">Logout</a>
{% else %}
<a href="{% url 'taxi:login' %}">Login</a>
{% endif %}

{% block content %}{% endblock %}

{% block pagination %}
{% include "includes/pagination.html" %}
{% endblock %}
</div>
</div>
Copy link

Choose a reason for hiding this comment

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

please move this to sidebar.html

Copy link

@Dimosphen1 Dimosphen1 left a comment

Choose a reason for hiding this comment

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

Several changes were requested

<ul>
<h1>Taxi Service Home</h1>
<p>Welcome to Best Taxi Ever!</p>
<p>You have visited this page {{ num_visits }} times.</p>

Choose a reason for hiding this comment

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

Please, use pluralize to form the number of visits according to the checklist

Copy link

@Dimosphen1 Dimosphen1 left a comment

Choose a reason for hiding this comment

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

LGTM, well done!

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.

None yet

4 participants