Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
janang_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
Jan Ericsson Ong Ang
janang_reading
Commits
eb95db7f
Commit
eb95db7f
authored
Apr 25, 2023
by
Jan Ericsson Ong Ang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added comment for views.py
parent
c856c66d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
1 deletion
+1
-1
views.cpython-310.pyc
janang_reading/bookshelf/__pycache__/views.cpython-310.pyc
+0
-0
views.py
janang_reading/bookshelf/views.py
+1
-1
No files found.
janang_reading/bookshelf/__pycache__/views.cpython-310.pyc
View file @
eb95db7f
No preview for this file type
janang_reading/bookshelf/views.py
View file @
eb95db7f
...
...
@@ -10,6 +10,7 @@ from .models import Author, Books
def
HomeView
(
request
):
return
render
(
request
,
'bookshelf/home.html'
,
{
'nickname'
:
'Jan'
})
#CBV
class
AuthorView
(
ListView
):
model
=
Author
queryset
=
Author
.
objects
.
all
()
...
...
@@ -17,7 +18,6 @@ class AuthorView(ListView):
author_data
=
Author
.
objects
.
all
()
.
values
()
return
render
(
request
,
'bookshelf/authors.html'
,
{
'nickname'
:
'Jan'
,
'author_data'
:
author_data
})
#CBV
class
AuthorDetailView
(
DetailView
):
pk_url_kwarg
=
'id'
model
=
Author
...
...
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