Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
enricosuplico_reading
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Enrico Lucio A. Suplico
enricosuplico_reading
Commits
1934475c
Commit
1934475c
authored
May 04, 2023
by
enricosuplico
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated views.py
parent
b55227b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
views.py
bookshelf/views.py
+23
-2
No files found.
bookshelf/views.py
View file @
1934475c
...
...
@@ -3,6 +3,7 @@ from django.http import HttpResponse
from
django.views
import
View
from
django.views.generic.list
import
ListView
from
django.views.generic.detail
import
DetailView
from
django.views.generic.edit
import
CreateView
,
UpdateView
from
.models
import
Author
,
Books
...
...
@@ -10,7 +11,7 @@ def Homepage_View(request):
return
render
(
request
,
'bookshelf/home.html'
)
class
Books_List_View
(
ListView
):
model
s
=
Books
model
=
Books
template_name
=
'bookshelf/books.html'
class
Books_Detail_View
(
DetailView
):
...
...
@@ -23,5 +24,25 @@ class Authors_List_View(ListView):
class
Authors_Detail_View
(
DetailView
):
model
=
Author
template_name
=
'bookshelf/author_details.html'
template_name
=
'bookshelf/authors_details.html'
class
Book_Create_View
(
CreateView
):
model
=
Books
fields
=
'__all__'
template_name
=
'bookshelf/add-book.html'
class
Author_Create_View
(
CreateView
):
model
=
Author
fields
=
'__all__'
template_name
=
'bookshelf/add-author.html'
class
Book_Update_View
(
UpdateView
):
model
=
Books
fields
=
'__all__'
template_name
=
'bookshelf/edit-book.html'
class
Author_Update_View
(
UpdateView
):
model
=
Author
fields
=
'__all__'
template_name
=
'bookshelf/edit-author.html'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment