Skip to content

Commit d570de7

Browse files
authored
#M06. As a User, I would like to see my account. (#69)
1 parent 919ceb8 commit d570de7

4 files changed

Lines changed: 38 additions & 6 deletions

File tree

main/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
urlpatterns = [
55
path("", include("home.urls")),
66
path("admin/", admin.site.urls),
7-
path("accounts", include("allauth.urls")),
7+
path("accounts/", include("allauth.urls")),
88
path("profile/", include("profiles.urls")),
99
path("hackathon/", include(("hackathon.urls", "hackathon"),
1010
namespace='hackathon')),

profiles/templates/profiles/profile.html

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,39 @@
33

44
{% block content %}
55

6-
<!-- TO DO : build profile page -->
7-
TEST PROFILE PAGE
6+
<h1>Profile Page</h1>
7+
<h2>You are logged in as:</h2>
88

9+
<!-- Profile display -->
10+
11+
<div class="container-fluid">
12+
<div class="row">
13+
14+
<div class="col-md-4">
15+
<h4>Username:</h4>
16+
<p>{{ user.username }}</p>
17+
</div>
18+
19+
<div class="col-md-4">
20+
<h4>Email Address:</h4>
21+
<p>{{ user.email }}</p>
22+
</div>
23+
24+
</div>
25+
26+
<div class="row">
27+
28+
<div class="col-md-4">
29+
<h4>First name:</h4>
30+
<p>{{ user.first_name }}</p>
31+
</div>
32+
33+
<div class="col-md-4">
34+
<h4>Last name:</h4>
35+
<p>{{ user.last_name }}</p>
36+
</div>
37+
38+
</div>
39+
40+
</div>
941
{% endblock %}

templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
{% include "includes/footer.html" %}
3838
</footer>
3939

40-
</body>
41-
4240
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
4341
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous">
4442
</script>
@@ -52,4 +50,6 @@
5250
{% endblock %}
5351
<script src="{% static 'js/script.js' %}"></script>
5452

53+
</body>
54+
5555
</html>

templates/includes/navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<a class="dropdown-item" href="#">Register</a>
4343
<a class="dropdown-item" href="#">Login</a>
4444
<div class="dropdown-divider"></div>
45-
<a class="dropdown-item" href="#">My Profile</a>
45+
<a class="dropdown-item" href="{% url 'profile' %}">My Profile</a>
4646
<a class="dropdown-item" href="#">Logout</a>
4747
</div>
4848
</li>

0 commit comments

Comments
 (0)