Commit f4193577 authored by Jan Ericsson Ong Ang's avatar Jan Ericsson Ong Ang

edited views.py for home view function

parent e93041db
from django.shortcuts import render from django.shortcuts import render
from django.views import View
from django.views.generic.detail import DetailView from django.views.generic.detail import DetailView
from django.views.generic.list import ListView from django.views.generic.list import ListView
from .models import Author, Books from .models import Author, Books
# Create your views here. # Create your views here.
class HomeView: class HomeView(View):
def get(self, request): def get(self, request):
return render(request, 'bookshelf/home.html', {'nickname': 'Jan'}) return render(request, 'bookshelf/home.html', {'nickname': 'Jan'})
......
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