mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Display template, book list, and admin page changes.
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
from django.http import HttpResponse
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
from .models import Books
|
||||
|
||||
|
||||
def index(request):
|
||||
return HttpResponse("HTTP Request")
|
||||
return render(request, "index.html", {'Books': Books.objects.all()})
|
||||
|
||||
|
||||
def book_set(_set):
|
||||
r = 20
|
||||
x = _set*r
|
||||
y = x + r
|
||||
books = Books.objects.all()[x:y]
|
||||
return books
|
||||
|
||||
Reference in New Issue
Block a user