Commit 6dd26e0b authored by Ysabella Panghulan's avatar Ysabella Panghulan

added AuthorCreateView class in views.py

parent 300db30f
......@@ -4,6 +4,7 @@ from django.views import View
from django.shortcuts import render
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView
# Create your views here.
def Homepage(request):
......@@ -29,4 +30,8 @@ class AuthorListView(ListView):
class AuthorDetailView(DetailView):
model = Author
template_name = 'bookshelf/author_details.html'
\ No newline at end of file
template_name = 'bookshelf/author_details.html'
class AuthorCreateView(CreateView):
model = Author
fields = '__all__'
\ 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