-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #300 from PdxCodeGuild/master
merge master into django-01
- Loading branch information
Showing
83 changed files
with
2,463 additions
and
25 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{%load static%} | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand" href="#">Picster</a> | ||
<a href="" class='link-success'> | ||
<i class="far fa-plus-square large-icon"></i> | ||
</a> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" | ||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarNav"> | ||
<ul class="navbar-nav w-100 d-flex justify-content-end"> | ||
<div class="d-flex gap-2"> | ||
|
||
{% if request.user.is_authenticated %} | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">Logout</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#"> | ||
<img src="{% static user.avatar.url %}" height=40 width=40 alt="{{user.username}}'s avatar"> | ||
</a> | ||
</li> | ||
</div> | ||
|
||
{% else %} | ||
<div class="d-flex gap-2"> | ||
|
||
<li class="nav-item"> | ||
<a class="nav-link" href="#">Features</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">Pricing</a> | ||
</li> | ||
</div> | ||
|
||
</ul> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</nav> |
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,68 @@ | ||
{% extends 'base.html' %} | ||
{% load static %} | ||
{% block content %} | ||
|
||
<div class="row"> | ||
<div class="col-12 col-lg-8 offset-lg-2 d-flex gap-3 flex-column align-items-center pt-5"> | ||
<h1 class="h1 py-2">{{user.username}}</h1> | ||
{% if request.user == user %} | ||
<a href="{% url 'users_app:update' user.username %}" class='link-secondary'> | ||
<i class="fas fa-edit"></i> | ||
</a> | ||
{% endif %} | ||
<img src="{% static user.avatar.url %}" alt="{{user.username}}'s avatar" class="rounded-circle shadow" height=250 width=250> | ||
</div> | ||
|
||
<div class="col-8 offset-2 col-lg-4 offset-lg-4 pt-5"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th scope="row">First</th> | ||
<td> | ||
{% if user.first_name %} | ||
{{user.first_name}} | ||
{% else %} | ||
Not Provided | ||
{% endif %} | ||
</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">Last</th> | ||
<td>{% if user.last_name %} | ||
{{user.last_name}} | ||
{% else %} | ||
Not Provided | ||
{% endif %}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">Joined</th> | ||
<td colspan="2">{{user.date_joined|date}}</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">Pics</th> | ||
<td colspan="2">0</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">Followers</th> | ||
<td colspan="2">0</td> | ||
</tr> | ||
<tr> | ||
<th scope="row">Following</th> | ||
<td colspan="2">0</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
|
||
<h1 class="h1">Pics</h1> | ||
<div class="row d-flex justify-content-center pb-5 mb-5"> | ||
<!-- render user's pics --> | ||
</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,25 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block content %} | ||
<h1 class="h1 text-center">Log in</h1> | ||
|
||
|
||
<form action="{% url 'users_app:login' %}" method='POST' class='d-flex flex-column align-items-center gap-3'> | ||
|
||
<!-- {{form}} will render the entire form --> | ||
<fieldset> | ||
<label for="id_username">{{form.username.label}}</label> | ||
{{form.username}} | ||
</fieldset> | ||
|
||
<fieldset> | ||
<label for="id_password">{{form.password.label}}</label> | ||
{{form.password}} | ||
</fieldset> | ||
|
||
{% csrf_token %} | ||
|
||
<button type='submit' class='btn btn-success'>Log in</button> | ||
</form> | ||
|
||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{% extends 'base.html' %} | ||
{% load static %} | ||
|
||
|
||
{% block content %} | ||
|
||
<div class="row"> | ||
<div class="col-12 col-lg-8 offset-lg-2 d-flex flex-column align-items-center pt-5"> | ||
<h1 class="h1 py-2">{{user.username}}</h1> | ||
<img src="{% static user.avatar.url %}" alt="{{user.username}}'s avatar" | ||
class='rounded-circle shadow' height=250 width=250> | ||
</div> | ||
|
||
|
||
<div class="col-10 offset-1 col-lg-4 offset-lg-4"> | ||
<form action="{% url 'users_app:update' user.username %}" enctype='multipart/form-data' method='POST' class='d-flex flex-column gap-2'> | ||
{% csrf_token %} | ||
{{form}} | ||
<button type='submit' class='btn btn-success'>Update</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
Oops, something went wrong.