projects
/
urtebook.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32f33fe
)
fixed initial index view
author
Sven Arnold
<sven@internetallee.de>
Mon, 8 Feb 2016 16:08:44 +0000
(17:08 +0100)
committer
Sven Arnold
<sven@internetallee.de>
Mon, 8 Feb 2016 16:08:44 +0000
(17:08 +0100)
project/books/views.py
patch
|
blob
|
history
diff --git
a/project/books/views.py
b/project/books/views.py
index
a8a020d
..
aa62cca
100644
(file)
--- 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"