Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
neptunesy_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
Star Neptune R. Sy
neptunesy_reading
Commits
28f58b1c
Commit
28f58b1c
authored
Mar 29, 2023
by
Star Neptune R. Sy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bookview is done but the books are gone
parent
5511a2d6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
4 deletions
+21
-4
urls.cpython-39.pyc
neptunesy_reading/bookshelf/__pycache__/urls.cpython-39.pyc
+0
-0
views.cpython-39.pyc
neptunesy_reading/bookshelf/__pycache__/views.cpython-39.pyc
+0
-0
book_detais.html
...sy_reading/bookshelf/templates/bookshelf/book_detais.html
+0
-0
booksView.html
...nesy_reading/bookshelf/templates/bookshelf/booksView.html
+15
-0
home.html
neptunesy_reading/bookshelf/templates/home.html
+2
-2
urls.py
neptunesy_reading/bookshelf/urls.py
+3
-1
views.py
neptunesy_reading/bookshelf/views.py
+1
-1
No files found.
neptunesy_reading/bookshelf/__pycache__/urls.cpython-39.pyc
View file @
28f58b1c
No preview for this file type
neptunesy_reading/bookshelf/__pycache__/views.cpython-39.pyc
View file @
28f58b1c
No preview for this file type
neptunesy_reading/bookshelf/templates/bookshelf/book_detais.html
0 → 100644
View file @
28f58b1c
neptunesy_reading/bookshelf/templates/bookshelf/booksView.html
0 → 100644
View file @
28f58b1c
{% block title%} My favorite books {% endblock %}
{% block additional %}
<h3>
Neptune's favorite books
</h3>
{% endblock %}
{% block content %}
<ol>
{% for obj in object_list %}
<li><a
href=
obj.get_absolute_url
>
{{ obj.title }}
</a></li>
{% endfor %}
</ol>
<div>
<a
href=
"/home"
>
Home
</a>
<a
href=
"/authors"
>
Authors
</a>
</div>
{% endblock %}
\ No newline at end of file
neptunesy_reading/bookshelf/templates/home.html
View file @
28f58b1c
...
...
@@ -7,8 +7,8 @@
{% block content %}
<p>
My taste in books are very random and usually done in the spur of the moment. I cannot commit to a series.
</p>
<div>
<a
href=
"
Books/
"
>
Books
</a>
<a
href=
"
Authors/
"
>
Authors
</a>
<a
href=
"
/books
"
>
Books
</a>
<a
href=
"
/authors
"
>
Authors
</a>
</div>
{% endblock %}
...
...
neptunesy_reading/bookshelf/urls.py
View file @
28f58b1c
# bookshelf/urls.py
from
django.urls
import
path
from
.views
import
homeView
from
.views
import
(
homeView
,
BooksView
,
BooksDetails
)
urlpatterns
=
[
path
(
'home/'
,
homeView
,
name
=
'home'
),
path
(
'books/'
,
BooksView
.
as_view
(),
name
=
'books'
),
path
(
'books/<int:pk>/details/'
,
BooksDetails
.
as_view
(),
name
=
'book-details'
),
]
# This might be needed, depending on your Django version
...
...
neptunesy_reading/bookshelf/views.py
View file @
28f58b1c
...
...
@@ -10,7 +10,7 @@ def homeView(request):
class
BooksView
(
ListView
):
model
=
Books
template_name
=
'bookshelf/books.html'
template_name
=
'bookshelf/books
View
.html'
class
BooksDetails
(
DetailView
):
...
...
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