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
cc0412ae
Commit
cc0412ae
authored
Mar 29, 2023
by
Star Neptune R. Sy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
book and book_detais are working
parent
8222a430
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
63 additions
and
3 deletions
+63
-3
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
base.html
neptunesy_reading/bookshelf/templates/base.html
+7
-0
book_detais.html
...sy_reading/bookshelf/templates/bookshelf/book_detais.html
+21
-0
books.html
neptunesy_reading/bookshelf/templates/bookshelf/books.html
+17
-0
home.html
neptunesy_reading/bookshelf/templates/home.html
+14
-0
urls.py
neptunesy_reading/bookshelf/urls.py
+1
-1
views.py
neptunesy_reading/bookshelf/views.py
+1
-1
db.sqlite3
neptunesy_reading/db.sqlite3
+0
-0
urls.cpython-39.pyc
...reading/neptunesy_reading/__pycache__/urls.cpython-39.pyc
+0
-0
urls.py
neptunesy_reading/neptunesy_reading/urls.py
+2
-1
No files found.
neptunesy_reading/bookshelf/__pycache__/urls.cpython-39.pyc
0 → 100644
View file @
cc0412ae
File added
neptunesy_reading/bookshelf/__pycache__/views.cpython-39.pyc
0 → 100644
View file @
cc0412ae
File added
neptunesy_reading/bookshelf/templates/base.html
View file @
cc0412ae
<head>
<title>
{% block title %}{% endblock %}
</title>
</head>
<body>
<h1>
{% block additional %}{% endblock %}
</h1>
<div>
{% block content %}{% endblock %}
</div>
</body>
neptunesy_reading/bookshelf/templates/bookshelf/book_detais.html
View file @
cc0412ae
{% extends 'base.html' %}
{% block title %} {{ object.title }} {% endblock %}
{% block additional %} {{ object.title }} {% endblock %}
{% block content %}
<ul>
<li>
{{ object.author }}
</li>
<li>
{{ object.publisher}}
</li>
<li>
{{ object.year_published}}
</li>
<li>
{{ object.ISBN}}
</li>
<li>
{{ object.blurb}}
</li>
</ul>
<div>
<a
href=
"/home"
>
Home
</a>
<a
href=
"/books"
>
Books
</a>
<a
href=
"/authors"
>
Authors
</a>
{% endblock %}
neptunesy_reading/bookshelf/templates/bookshelf/books.html
View file @
cc0412ae
{% extends 'base.html' %}
{% block title%} My favorite books {% endblock %}
{% block additional %}
<h1>
Neptune's favorite books
</h1>
{% endblock %}
{% block content %}
<ol>
{% for obj in object_list %}
<li><a
href=
"{{obj.get_absolute_url}}/details/"
>
{{ 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 @
cc0412ae
{% extends 'base.html' %}
{% block title %} My favorite Books and Authors {% endblock %}
{% block additional %}
<h1>
Welcome to Neptune's database of favorite books and authors
</h1>
{% endblock %}
{% 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>
</div>
{% endblock %}
neptunesy_reading/bookshelf/urls.py
View file @
cc0412ae
...
...
@@ -5,7 +5,7 @@ from .views import (homeView, BooksView, BooksDetail)
urlpatterns
=
[
path
(
'home/'
,
homeView
,
name
=
'home'
),
path
(
'books/'
,
BooksView
.
as_view
(),
name
=
"books"
),
path
(
'books/<int:pk>/details'
,
BooksDetail
.
as_view
(),
name
=
"book_details"
)
path
(
'books/<int:pk>/details
/
'
,
BooksDetail
.
as_view
(),
name
=
"book_details"
)
]
# This might be needed, depending on your Django version
...
...
neptunesy_reading/bookshelf/views.py
View file @
cc0412ae
...
...
@@ -14,4 +14,4 @@ class BooksView(ListView):
class
BooksDetail
(
DetailView
):
model
=
Book
template_name
=
"bookshelf/book
D
etais.html"
template_name
=
"bookshelf/book
_d
etais.html"
neptunesy_reading/db.sqlite3
View file @
cc0412ae
No preview for this file type
neptunesy_reading/neptunesy_reading/__pycache__/urls.cpython-39.pyc
View file @
cc0412ae
No preview for this file type
neptunesy_reading/neptunesy_reading/urls.py
View file @
cc0412ae
...
...
@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from
django.contrib
import
admin
from
django.urls
import
path
from
django.urls
import
path
,
include
urlpatterns
=
[
path
(
'admin/'
,
admin
.
site
.
urls
),
path
(
''
,
include
(
'bookshelf.urls'
,
namespace
=
'bookshelf'
))
]
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