Commit 64188981 authored by karin-kurusu's avatar karin-kurusu

Created "Homepage" through "home.html" and modifying "urls.py" and "views.py"

parent e63b8a7b
{% extends 'base.html' %}
{% load static %}
{% block title %}My Favorite Books & Authors{% endblock %}
{% block content %}
<h2>
Welcome to {{name}}'s Database of Favorite Books and Authors!
</h2>
<p>
I'm going to be honest, it's been a really, really long time since I've actually read
<br>
any books, as all I've been reading is manga, so that's what this list pretty much consists of.
<br>
While I don't really have trouble reading just text, my attention span and interest really does
<br>
get much higher when I'm reading graphic novels like manga, hence why I enjoy reading them.
</p>
{% endblock %}
{% block navbar %}
<ul class="navbarList">
<li class="navbarItem"><a href="/books">Books</a></li>
<li class="navBarItem"><a href="/authors">Authors</a></li>
</ul>
{% endblock %}
\ No newline at end of file
from django.urls import path
from .views import home
urlpatterns = [
path('home/', home, name='home'),
]
app_name = "bookshelf"
\ No newline at end of file
from django.shortcuts import render
from .models import Author, Books
def home(request):
return render(request, 'home.html', {'name': 'Calvin'})
# Create your views here.
......@@ -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 include, path
urlpatterns = [
path('', include('bookshelf.urls', namespace="bookshelf")),
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