Commit 969e248f authored by Trisha Angel Millena's avatar Trisha Angel Millena

Created Homepage: made home.html and edited urls.py under bookself

parent 08b98b31
{% extends 'base.html' %}
{% load static %}
{% block title %}My Favorite Books and Authors{% endblock %}
{% block content %}
<h1>Welcome to Trisha's Database of Favorite Books and Authors!</h1>
<p>The genres I enjoy reading are a mix of Romance and Mystery. I try to explore works of different authors most of the time.</p>
<a href = '/bookshelf/books/'>Books</a>
<a href = '/bookshelf/authors/'>Authors</a>
{% endblock %}
from django.urls import path
from .views import index
from . import views
urlpatterns = [
path('', index, name = 'index'),
path('home/', views.home, name = 'home'),
]
app_name = "bookshelf"
\ No newline at end of file
from django.http import HttpResponse
from django.shortcuts import render
# Create your views here.
def index(request):
return HttpResponse('')
\ No newline at end of file
def home(request):
return render(request, 'bookshelf/home.html')
\ No newline at end of file
......@@ -59,7 +59,7 @@ ROOT_URLCONF = 'trishamillena_reading.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
......@@ -123,6 +123,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.2/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
......
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