Commit 152d92f9 authored by Mavrick Jordan Lee's avatar Mavrick Jordan Lee

Created home view of app. Created temporary book and author view to test link.

parent 4ebe1c9d
{% extends 'base.html' %}
{% block title %}My Favorite Authors{% endblock %}
{% block content %}
<h1>{{name}}'s Favorite Authors:</h1>
<p>Mav like Japanese manga with authors that writes in a serious tone.</p>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}My Favorite Books{% endblock %}
{% block content %}
<h1>{{name}}'s Favorite Books:</h1>
<p>Mav like Japanese manga with authors that writes in a serious tone.</p>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}My Favorite Books & Authors{% endblock %}
{% block content %}
<h1>Welcome to {{name}}'s Database of Favorite Books and Authors!</h1>
<p>Mav like Japanese manga with authors that writes in a serious tone.</p>
<a href="{% url 'books' %}">Books</a>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
<a href="{% url 'authors' %}">Authors</a>
{% endblock %}
\ No newline at end of file
from django.urls import path
from . import views
urlpatterns = [
path('home/', views.home_view, name = "home"),
path('book/', views.books_view, name = "books"),
path('authors/', views.authors_view, name = "authors"),
]
\ No newline at end of file
from django.shortcuts import render
# Create your views here.
def home_view(request):
return render(request, 'bookshelf/home.html', {
'name': 'Mav',
})
def books_view(request):
return render(request, 'bookshelf/books.html', {
'name': 'Mav',
})
def authors_view(request):
return render(request, 'bookshelf/authors.html', {
'name': 'Mav',
})
......@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
urlpatterns = [
path('', include('bookshelf.urls')),
path('admin/', admin.site.urls),
]
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