Commit 0eafd77f authored by Julia Anishka's avatar Julia Anishka

fixedd home format

parent 0a3547f4
{% extends 'base.html' %}
{% block title %} My Favorite Books & Authors {% endblock %}
{% block body %}
<h1> My Favorite Books & Authors </h1>
<h3><center> Welcome to Nisha's Database of <br> Favorite Books and Authors! </center></h3>
<p> The genres I usually enjoy include mystery, romance, and fantasy. From narratives
that revolve around crimes to supernatural elements in a fictional world, I find each
......
from django.urls import path
from . import views
from .views import BooksListView
urlpatterns = [
path('home', views.homepage_view, name='home')
path('books', BooksView.as_view(), name='books')
path('home', views.homepage_view, name='home'),
path('books', BooksListView.as_view(), name='books-list')
]
......
from django.shortcuts import render
from django.http import HttpResponse
from django.views import View
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import Author, Books
......@@ -13,3 +15,5 @@ def homepage_view(request):
}
return render(request, 'home.html', context)
class BooksListView(ListView):
model = Books
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