-
Notifications
You must be signed in to change notification settings - Fork 845
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46d9023
commit e172ce6
Showing
10 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
venv/ | ||
.pytest_cache/ | ||
**__pycache__/ | ||
db.sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
<ul class="sidebar-nav"> | ||
{% if user.is_authenticated %} | ||
<li><h2>Hi, {{ user.username }}</h2></li> | ||
{% endif %} | ||
<li><a href="{% url "taxi:index" %}">Home page</a></li> | ||
<li><a href="{% url "taxi:manufacturer-list" %}">Manufacturers</a></li> | ||
<li><a href="{% url "taxi:car-list" %}">Cars</a></li> | ||
<li><a href="{% url "taxi:driver-list" %}">Drivers</a></li> | ||
{% if user.is_authenticated %} | ||
<li><a href="{% url "logout" %}">Log out</a></li> | ||
{% else %} | ||
<li><a href="{% url "login" %}">Login</a></li> | ||
|
||
{% endif %} | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% extends "base.html" %} | ||
{% block content %} | ||
<div class="container"> | ||
<h1>You have successfully logged out</h1> | ||
<a href="{% url "taxi:index" %}">Back to the home page</a> | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% extends "base.html" %} | ||
{% block content %} | ||
<div style="width:500px; padding: 200px 0; margin: auto auto" class="container"> | ||
<div class="text-center"> | ||
{% if form.errors %} | ||
<div class="alert alert-danger" role="alert"> | ||
<strong>Error!</strong> Please correct the following errors: | ||
<ul> | ||
{% for field in form %} | ||
{% for error in field.errors %} | ||
<li>{{ error }}</li> | ||
{% endfor %} | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
<form class="form-signin" method="post"> | ||
{% csrf_token %} | ||
<h1 class="h3 mb-3 font-weight-normal">Sign in</h1> | ||
{{ form.as_p }} | ||
<button style="margin: 20px 0" class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button> | ||
</form> | ||
</div> | ||
</div> | ||
{% endblock content %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters