Commit 99ba4695 authored by Izaac Daniel B. Muncal's avatar Izaac Daniel B. Muncal
parents 2d8f31de c6288ec5
......@@ -19,4 +19,4 @@ class Books(models.Model):
blurb = models.TextField(max_length=200)
def __str__(self):
return "{}".format(self.title)
\ No newline at end of file
return "{}".format(self.title)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
{% extends 'base.html' %}
{% load static %}
</body>
</html>
\ No newline at end of file
{% block title %}{% endblock %}
{% block header %} header {% endblock %}
{% block body %} body {% endblock %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
{% extends 'base.html' %}
{% load static %}
</body>
</html>
\ No newline at end of file
{% block title %}{% endblock %}
{% block header %} header {% endblock %}
{% block body %} body {% endblock %}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
{% extends 'base.html' %}
{% load static %}
</body>
</html>
\ No newline at end of file
{% block title %}{% endblock %}
{% block header %} header {% endblock %}
{% block body %} body {% endblock %}
\ No newline at end of file
from django.shortcuts import render
from django.views import View
from django.http import render
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from .models import Books, Author
def home_view(request):
return render(request, 'bookshelf/home.html', {})
class HomeView(View):
def get(self,request):
return render(request, 'bookshelf/home.html', {})
class BooksView(ListView):
model = Books
class BooksView(View):
def get(self,request):
return render(request, 'bookshelf/books.html', {})
class BooksDetailView(DetailView):
model = Books
class BooksDetailView(View):
def get(self,request):
return render(request, 'bookshelf/books_detail.html', {})
class AuthorView(ListView):
model = Author
class AuthorView(View):
def get(self,request):
return render(request, 'bookshelf/author.html', {})
class AuthorDetailView(View):
def get(self,request):
return render(request, 'bookshelf/author_details.html', {})
\ No newline at end of file
class AuthorDetailView(DetailView):
model = Author
\ No newline at end of file
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