-
Notifications
You must be signed in to change notification settings - Fork 1
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 #8 from ylijokic/Sprint_2_Backend
Add DB config file, update templates, add images to Musician
- Loading branch information
Showing
12 changed files
with
93 additions
and
56 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
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,59 +1,62 @@ | ||
{% load static %} | ||
<!--Base HTML template for all pages within One Hit Wonder Project--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> | ||
<link rel="stylesheet" href="{% static 'css/bootstrap.css' %}"> | ||
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> | ||
<link rel="stylesheet" href="{% static 'css/bootstrap.css' %}"> | ||
|
||
{% if title %} | ||
<title>One Hit Wonder - {{ title }}</title> | ||
{% else %} | ||
<title>One Hit Wonder</title> | ||
{% endif %} | ||
{% if title %} | ||
<title>One Hit Wonder - {{ title }}</title> | ||
{% else %} | ||
<title>One Hit Wonder</title> | ||
{% endif %} | ||
</head> | ||
<body> | ||
<nav class="navbar sticky-top navbar-expand-lg navbar-dark bg-dark"> | ||
<a class="navbar-brand" href="{% url 'account-home' %}">One Hit Wonder</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation"> | ||
<!--Navigation bar--> | ||
<nav class="navbar sticky-top navbar-expand-lg navbar-dark bg-dark"> | ||
<a class="navbar-brand" href="{% url 'account-landing' %}">One Hit Wonder</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="collapse navbar-collapse" id="navbarNavAltMarkup"> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarNavAltMarkup"> | ||
<div class="navbar-nav mr-auto"> | ||
<a class="nav-item nav-link active" href="{% url 'account-home' %}">Home<span class="sr-only">(current)</span></a> | ||
<a class="nav-item nav-link" href="{% url 'account-profile' %}">Profile</a> | ||
<a class="nav-item nav-link" href="{% url 'account-messages' %}">Messages</a> | ||
<a class="nav-item nav-link" href="{% url 'account-matches' %}">Matches</a> | ||
<a class="nav-item nav-link" href="{% url 'account-create_ad' %}">Create Ad</a> | ||
{% if user.is_authenticated %} | ||
<a class="nav-item nav-link active" href="{% url 'account-home' %}">Home<span class="sr-only">(current)</span></a> | ||
<a class="nav-item nav-link" href="{% url 'account-profile' %}">Profile</a> | ||
<a class="nav-item nav-link" href="{% url 'account-messages' %}">Messages</a> | ||
<a class="nav-item nav-link" href="{% url 'account-matches' %}">Matches</a> | ||
<a class="nav-item nav-link" href="{% url 'account-create_ad' %}">Create Ad</a> | ||
{% endif %} | ||
</div> | ||
<!-- Right side of Navbar --> | ||
<div class="navbar-nav"> | ||
<!-- Conditional block to display login/logout links in navbar --> | ||
{% if user.is_authenticated %} | ||
<a href="{% url 'logout' %}" class="nav-item nav-link">Logout</a> | ||
{% else %} | ||
<a href="{% url 'login' %}" class="nav-item nav-link">Login</a> | ||
<a href="{% url 'register' %}" class="nav-item nav-link">Register</a> | ||
{% endif %} | ||
<!-- Conditional block to display login/logout links in navbar --> | ||
{% if user.is_authenticated %} | ||
<a href="{% url 'logout' %}" class="nav-item nav-link">Logout</a> | ||
{% else %} | ||
<a href="{% url 'login' %}" class="nav-item nav-link">Login</a> | ||
<a href="{% url 'register' %}" class="nav-item nav-link">Register</a> | ||
{% endif %} | ||
|
||
</div> | ||
</div> | ||
</nav> | ||
<div class = "container"> | ||
{% if messages %} | ||
</div> | ||
</nav> | ||
<div class = "container"> | ||
{% if messages %} | ||
{% for message in messages %} | ||
<div class="alert alert-{{message.tags}}"> | ||
{{ message }} | ||
</div> | ||
<div class="alert alert-{{message.tags}}"> | ||
{{ message }} | ||
</div> | ||
{% endfor %} | ||
{% endif %} | ||
{% block content %}{% endblock %} | ||
</div> | ||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> | ||
{% endif %} | ||
{% block content %}{% endblock %} | ||
</div> | ||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> | ||
</body> | ||
</html> |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
{% block content %} | ||
<h1>Create Ad</h1> | ||
{% endblock content %} | ||
{% 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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
{% extends "account/base.html" %} | ||
|
||
<h1>Welcome Back!</h1> | ||
|
||
{% block content %} | ||
<h1>Welcome Back!</h1> | ||
{% for post in posts %} | ||
<h1>{{ post.title }}</h1> | ||
<h2>{{ post.title }}</h2> | ||
<p>By {{ post.musician }} on {{ post.date_posted }}</p> | ||
<p>{{ post.content }}</p> | ||
{% endfor %} | ||
{{ musician.user.username }} | ||
{% 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,5 @@ | ||
{% extends "account/base.html" %} | ||
|
||
{% block content %} | ||
<h1>One Hit Wonder</h1> | ||
{% 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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
{% block content %} | ||
<h1>Matches</h1> | ||
{% endblock content %} | ||
{% 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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
{% block content %} | ||
<h1>Messages</h1> | ||
{% endblock content %} | ||
{% 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 |
---|---|---|
@@ -1,8 +1,14 @@ | ||
{% extends "account/base.html" %} | ||
|
||
{% load crispy_forms_tags %} | ||
{% block content %} | ||
<h1>Profile</h1> | ||
<h2>{{ user.username }}</h2> | ||
<p>{{ user.first_name }}</p> | ||
<p>{{ musician.location }}</p> | ||
<div class="content-section"> | ||
<div class="media"> | ||
<img class="rounded-circle account-img" src="{{ user.musician.image.url }}"> | ||
<div class="media-body"> | ||
<h2 class="account-heading">{{ user.username }}</h2> | ||
<p class="text-secondary">{{ user.email }}</p> | ||
</div> | ||
</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
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 @@ | ||
[client] | ||
host = one-hit-wonder.cqtwgm1vyu0i.us-east-1.rds.amazonaws.com | ||
database = one_hit_wonder | ||
user = admin | ||
password = D0nt8reakM3! | ||
default-character-set = utf8 | ||
init_command = SET default_storage_engine=INNODB |
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