Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alvaalvarez_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
Angelo Alvarez
alvaalvarez_reading
Commits
75c51014
Commit
75c51014
authored
Apr 25, 2023
by
Angelo Alvarez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added explicit template names for existing Views
parent
fba2c8bb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
views.cpython-310.pyc
...varez_reading/bookshelf/__pycache__/views.cpython-310.pyc
+0
-0
views.py
alvaalvarez_reading/bookshelf/views.py
+4
-0
No files found.
alvaalvarez_reading/bookshelf/__pycache__/views.cpython-310.pyc
View file @
75c51014
No preview for this file type
alvaalvarez_reading/bookshelf/views.py
View file @
75c51014
...
...
@@ -10,15 +10,19 @@ def home(request):
return
render
(
request
,
'bookshelf/home.html'
)
class
BooksListView
(
ListView
):
template_name
=
'bookshelf/books_list.html'
model
=
Books
class
BooksDetailView
(
DetailView
):
template_name
=
'bookshelf/books_detail.html'
model
=
Books
class
AuthorListView
(
ListView
):
template_name
=
'bookshelf/author_list.html'
model
=
Author
class
AuthorDetailView
(
DetailView
):
template_name
=
'bookshelf/author_detail.html'
model
=
Author
booklist
=
Books
.
objects
.
all
()
extra_context
=
{
'books'
:
booklist
}
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