Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
ilizh committed Oct 22, 2023
1 parent 6e94434 commit cdd2bed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions templates/includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<ul class="sidebar-nav">
{% if user.is_authenticated %}
<p>User: <a href="{% url "taxi:driver-detail" pk=user.pk %}">{{ user.username }}</a></p>
<a href="{% url "logout" %}">Logout</a>
<a href="{% url "taxi:user-logout" %}">Logout</a>
{% else %}
<a href="{% url "login" %}">Login</a>
<a href="{% url "taxi:user-login" %}">Login</a>
{% endif %}
<li><a href="{% url "taxi:index" %}">Home page</a></li>
<li><a href="{% url "taxi:manufacturer-list" %}">Manufacturers</a></li>
Expand Down
6 changes: 3 additions & 3 deletions templates/registration/login.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{% extends "base.html" %}

{% block content %}
<h1>Logout</h1>
<h1>Login</h1>

{% if form.errors %}
<p style="color: red">Invalid username or password!</p>
{% endif %}

<form method="post" action="{% url "login" %}">
<form method="post" action="{% url "taxi:user-login" %}">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="login">
<input type="submit" value="Login">
<input type="hidden" name="next" value="{{ next }}">
</form>

Expand Down

0 comments on commit cdd2bed

Please sign in to comment.