From: Sven Arnold Date: Mon, 8 Feb 2016 16:08:44 +0000 (+0100) Subject: fixed initial index view X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=621239d0972b7442edce00ab7a0614a88c68d558;p=urtebook.git fixed initial index view --- 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"