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
bdbd3cf4
Commit
bdbd3cf4
authored
Mar 29, 2023
by
Star Neptune R. Sy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restored the html files.
parent
5f93991c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
3 deletions
+21
-3
models.cpython-39.pyc
...unesy_reading/bookshelf/__pycache__/models.cpython-39.pyc
+0
-0
models.py
neptunesy_reading/bookshelf/models.py
+2
-0
base.html
neptunesy_reading/bookshelf/templates/base.html
+0
-0
book_detais.html
...sy_reading/bookshelf/templates/bookshelf/book_detais.html
+0
-0
books.html
neptunesy_reading/bookshelf/templates/bookshelf/books.html
+0
-0
home.html
neptunesy_reading/bookshelf/templates/home.html
+0
-0
urls.py
neptunesy_reading/bookshelf/urls.py
+4
-2
views.py
neptunesy_reading/bookshelf/views.py
+15
-1
No files found.
neptunesy_reading/bookshelf/__pycache__/models.cpython-39.pyc
View file @
bdbd3cf4
No preview for this file type
neptunesy_reading/bookshelf/models.py
View file @
bdbd3cf4
...
...
@@ -10,6 +10,8 @@ class Author(models.Model):
def
__str__
(
self
):
return
"{} {}"
.
format
(
self
.
first_name
,
self
.
last_name
)
class
Book
(
models
.
Model
):
...
...
neptunesy_reading/bookshelf/templates/b
ookshelf/index
.html
→
neptunesy_reading/bookshelf/templates/b
ase
.html
View file @
bdbd3cf4
File moved
neptunesy_reading/bookshelf/templates/bookshelf/book_detais.html
0 → 100644
View file @
bdbd3cf4
neptunesy_reading/bookshelf/templates/bookshelf/books.html
0 → 100644
View file @
bdbd3cf4
neptunesy_reading/bookshelf/templates/home.html
0 → 100644
View file @
bdbd3cf4
neptunesy_reading/bookshelf/urls.py
View file @
bdbd3cf4
# bookshelf/urls.py
from
django.urls
import
path
from
.views
import
index
from
.views
import
(
homeView
,
BooksView
,
BooksDetail
)
urlpatterns
=
[
path
(
''
,
index
,
name
=
'index'
),
path
(
'home/'
,
homeView
,
name
=
'home'
),
path
(
'books/'
,
BooksView
.
as_view
(),
name
=
"books"
),
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 @
bdbd3cf4
from
django.shortcuts
import
render
from
django.views.generic.detail
import
DetailView
from
django.views.generic.list
import
ListView
from
.models
import
Author
,
Book
# Create your views here.
def
homeView
(
request
):
return
render
(
request
,
'home.html'
)
class
BooksView
(
ListView
):
model
=
Book
template_name
=
"bookshelf/books.html"
class
BooksDetail
(
DetailView
):
model
=
Book
template_name
=
"bookshelf/bookDetais.html"
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