Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
joaqscrisologo_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
Joaquin Inigo Crisologo
joaqscrisologo_reading
Commits
a49ab9a5
Commit
a49ab9a5
authored
Mar 28, 2023
by
Joaquin Inigo Crisologo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add books by this author section to author detail page
parent
5b284520
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
1 deletion
+9
-1
urls.cpython-39.pyc
...isologo_reading/bookshelf/__pycache__/urls.cpython-39.pyc
+0
-0
views.cpython-39.pyc
...sologo_reading/bookshelf/__pycache__/views.cpython-39.pyc
+0
-0
author_detail.html
..._reading/bookshelf/templates/bookshelf/author_detail.html
+7
-0
views.py
joaqscrisologo_reading/bookshelf/views.py
+1
-0
urls.cpython-39.pyc
...ng/joaqscrisologo_reading/__pycache__/urls.cpython-39.pyc
+0
-0
urls.py
joaqscrisologo_reading/joaqscrisologo_reading/urls.py
+1
-1
No files found.
joaqscrisologo_reading/bookshelf/__pycache__/urls.cpython-39.pyc
View file @
a49ab9a5
No preview for this file type
joaqscrisologo_reading/bookshelf/__pycache__/views.cpython-39.pyc
View file @
a49ab9a5
No preview for this file type
joaqscrisologo_reading/bookshelf/templates/bookshelf/author_detail.html
View file @
a49ab9a5
...
...
@@ -10,6 +10,13 @@
<li>
<b>
Nationality:
</b>
{{object.nationality}}
</li>
<li>
<b>
Bio:
</b>
{{object.bio}}
</li>
</ul>
<br>
<h3>
Books by {{object}} I love:
</h3>
<ul>
{% for book in object.books.all %}
<li>
<a
href=
"{{book.get_absolute_url}}"
>
{{book}}
</a>
</li>
{% endfor %}
</ul>
<br><hr><br><br>
<a
href=
"../../../home/"
>
Home
</a>
<a
href=
"../../../authors/"
>
Authors
</a>
<a
href=
"../../../books/"
>
Books
</a>
{% endblock %}
\ No newline at end of file
joaqscrisologo_reading/bookshelf/views.py
View file @
a49ab9a5
...
...
@@ -14,6 +14,7 @@ class AuthorListView(ListView):
class
AuthorDetailView
(
DetailView
):
model
=
Author
books_list
=
Books
.
objects
.
all
()
class
BooksListView
(
ListView
):
model
=
Books
...
...
joaqscrisologo_reading/joaqscrisologo_reading/__pycache__/urls.cpython-39.pyc
View file @
a49ab9a5
No preview for this file type
joaqscrisologo_reading/joaqscrisologo_reading/urls.py
View file @
a49ab9a5
...
...
@@ -18,8 +18,8 @@ from django.urls import include, path
from
bookshelf
import
views
urlpatterns
=
[
path
(
'bookshelf/'
,
include
(
'bookshelf.urls'
,
namespace
=
"bookshelf"
)),
path
(
'admin/'
,
admin
.
site
.
urls
),
path
(
''
,
include
(
'bookshelf.urls'
,
namespace
=
"bookshelf"
)),
path
(
'home/'
,
views
.
HomeView
,
name
=
'home'
),
path
(
'authors/'
,
views
.
AuthorListView
.
as_view
(),
name
=
'authors-list'
),
...
...
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