Commit 87e27b95 authored by Jayson Lim's avatar Jayson Lim

Finalized the templates, configured urls, and applied basic CSS styling

parent 78a9b85c
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
h1, ul, a { h1, ul, a {
color: white; color: white;
} }
</style> </style>
<h1>Jayson's Favorite Authors:</h1> <h1>Jayson's Favorite Authors:</h1>
<ul> <ul>
......
...@@ -26,8 +26,12 @@ ...@@ -26,8 +26,12 @@
<p style="font-size: 20px">I enjoy the works of: George R.R. Martin, Robert Ludlum, J.K. Rowling, Dan Brown, <p style="font-size: 20px">I enjoy the works of: George R.R. Martin, Robert Ludlum, J.K. Rowling, Dan Brown,
John Grisham, Tom Clancy, and J.R.R. Tolkien.</p> John Grisham, Tom Clancy, and J.R.R. Tolkien.</p>
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
<a href="{% url 'bookshelf:books' %}">Books</a> <a href="{% url 'bookshelf:books' %}" style="margin-bottom: 20px;">Books</a>
<a href="{% url 'bookshelf:authors' %}">Authors</a> <a href="{% url 'bookshelf:authors' %}" style="margin-bottom: 20px;">Authors</a>
</div>
<div style="display: flex; justify-content: space-between;">
<a href="{% url 'bookshelf:books-create' %}">Add Book</a>
<a href="{% url 'bookshelf:authors-create' %}">Add Author</a>
</div> </div>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -10,7 +10,11 @@ from django.urls import reverse, reverse_lazy ...@@ -10,7 +10,11 @@ from django.urls import reverse, reverse_lazy
def home_view(request): def home_view(request):
authors_url = reverse('bookshelf:authors') authors_url = reverse('bookshelf:authors')
books_url = reverse('bookshelf:books') books_url = reverse('bookshelf:books')
context = {'authors_url': authors_url, 'books_url': books_url} authors_create_url = reverse('bookshelf:authors-create')
books_create_url = reverse('bookshelf:books-create')
context = {'authors_url': authors_url, 'books_url': books_url,
'authors_create_url':authors_create_url,
'books_create_url':books_create_url}
return render(request, 'bookshelf/home.html', context) return render(request, 'bookshelf/home.html', context)
class BooksListView(ListView): class BooksListView(ListView):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment