Commit 2cf4da2f authored by Jan Ericsson Ong Ang's avatar Jan Ericsson Ong Ang

Made a tentative change to views.py for bookshelf

parent cc0495f2
from django.contrib import admin from django.contrib import admin
# Register your models here.
from.models import Author, Books from.models import Author, Books
# Register your models here.
class AuthorAdmin(admin.ModelAdmin): class AuthorAdmin(admin.ModelAdmin):
model = Author model = Author
list_display = ("first_name", "last_name", "age", "nationality", "bio",) list_display = ("first_name", "last_name", "age", "nationality", "bio",)
......
...@@ -9,7 +9,7 @@ class Author(models.Model): ...@@ -9,7 +9,7 @@ class Author(models.Model):
bio = models.TextField(max_length=700, default="") bio = models.TextField(max_length=700, default="")
def __str__(self): def __str__(self):
return self.first_name + self.last_name return self.first_name + " " + self.last_name
class Books(models.Model): class Books(models.Model):
title = models.CharField() title = models.CharField()
......
...@@ -5,6 +5,6 @@ from .models import Author, Books ...@@ -5,6 +5,6 @@ from .models import Author, Books
def bookshelfIndex(request): def bookshelfIndex(request):
title = 'Landing Page Stuff<br><br>' title = 'Landing Page Stuff<br><br>'
output_view = "" output_view = "" + Author + " wrote " + Books + "!"
return HttpResponse(title + output_view) return HttpResponse(title + output_view)
\ 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