Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alliyah_marcelo_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
Alliyah Ericka Therese E. Marcelo
alliyah_marcelo_reading
Commits
9ad680e5
Commit
9ad680e5
authored
Mar 28, 2023
by
Alliyah Marcelo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed unnecessary code in author_detail.
parent
00292826
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
author_detail.html
..._reading/bookshelf/templates/bookshelf/author_detail.html
+5
-9
views.py
alliyah_marcelo_reading/bookshelf/views.py
+6
-1
No files found.
alliyah_marcelo_reading/bookshelf/templates/bookshelf/author_detail.html
View file @
9ad680e5
...
@@ -14,15 +14,11 @@
...
@@ -14,15 +14,11 @@
<br><br>
<br><br>
Books by {{ object }} I love:
Books by {{ object }} I love:
<br>
<br>
<ul>
{% for book in books %}
{% for book in books_list.html %}
{% if book.author == object %}
{% if book.author == object %}
<li>
<a
href=
"{{ book.get_absolute_url }}"
>
{{ book.title }}
</a>
<a
href=
"{{ book.get_absolute_url }}"
>
{{ book.title }}
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
</ul>
<br><br>
<br><br>
<a
href=
"/bookshelf/home/"
>
Home
</a>
<a
href=
"/bookshelf/home/"
>
Home
</a>
<a
href=
"/bookshelf/books/"
>
Books
</a>
<a
href=
"/bookshelf/books/"
>
Books
</a>
...
...
alliyah_marcelo_reading/bookshelf/views.py
View file @
9ad680e5
...
@@ -23,3 +23,8 @@ class AuthorListView(ListView):
...
@@ -23,3 +23,8 @@ class AuthorListView(ListView):
class
AuthorDetailsView
(
DetailView
):
class
AuthorDetailsView
(
DetailView
):
model
=
Author
model
=
Author
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
()
.
get_context_data
(
**
kwargs
)
context
[
'books'
]
=
Books
.
objects
.
all
()
return
context
\ No newline at end of file
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