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