From 621239d0972b7442edce00ab7a0614a88c68d558 Mon Sep 17 00:00:00 2001 From: Sven Arnold Date: Mon, 8 Feb 2016 17:08:44 +0100 Subject: [PATCH] fixed initial index view --- project/books/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/books/views.py b/project/books/views.py index a8a020d..aa62cca 100644 --- a/project/books/views.py +++ b/project/books/views.py @@ -1,8 +1,11 @@ from django.shortcuts import render from django.http import HttpResponse +from books.models import Book, Lease + def index(request): - return HttpResponse("UrteBook") + books = ", ".join([str(b) for b in Book.objects.all()]) + return HttpResponse(books) def detail(request, book_id): response = "Book ID: %s" -- 2.11.0