Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Deokhyun_Lee_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
Deokhyun Lee
Deokhyun_Lee_reading
Commits
2d9eaad6
Commit
2d9eaad6
authored
Mar 27, 2023
by
Deokhyun Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
links to books and authors now moved to base.html
parent
be16c186
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
3 deletions
+40
-3
views.cpython-39.pyc
bookshelf/__pycache__/views.cpython-39.pyc
+0
-0
index.html
bookshelf/templates/authors/index.html
+15
-0
index.html
bookshelf/templates/books/index.html
+10
-0
index.html
bookshelf/templates/home/index.html
+1
-1
views.py
bookshelf/views.py
+13
-2
base.html
templates/base.html
+1
-0
No files found.
bookshelf/__pycache__/views.cpython-39.pyc
View file @
2d9eaad6
No preview for this file type
bookshelf/templates/authors/index.html
0 → 100644
View file @
2d9eaad6
{% extends 'base.html'%}
{% block title %}
My Favorite Books
&
Authors
{% endblock %}
{% block content %}
<h1>
Welcome to Deokhyun's Database of Favorite Books and Authors!
</h1>
<p>
My personal preference:
<p>
I love reading fantasy or Science Fiction!
Therefore, Frank Herbert's
Dune is one of the best
American authors for me!
</p></p>
<a
href=
"/books"
>
Books
</a>
&
nbsp
&
nbsp
&
nbsp
&
nbsp
&
nbsp
<a
href=
"/authors"
>
Authors
</a>
{% endblock %}
\ No newline at end of file
bookshelf/templates/books/index.html
0 → 100644
View file @
2d9eaad6
{% extends 'base.html'%}
{% block title %}
My Favorite Books
{% endblock %}
{% block content %}
<h1>
Deokhyun's Favorite Books:
</h1>
{% endblock %}
\ No newline at end of file
bookshelf/templates/home/index.html
View file @
2d9eaad6
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
{% block title %}
{% block title %}
My Favorite Books
&
Authors
My Favorite Books
&
Authors
{% endblock %}
{% endblock %}
{% block content %}
{% block content %}
<h1>
Welcome to Deokhyun's Database of Favorite Books and Authors!
</h1>
<h1>
Welcome to Deokhyun's Database of Favorite Books and Authors!
</h1>
<p>
My personal preference:
<p>
My personal preference:
...
@@ -10,5 +11,4 @@
...
@@ -10,5 +11,4 @@
Therefore, Frank Herbert's
Therefore, Frank Herbert's
Dune is one of the best
Dune is one of the best
American authors for me!
</p></p>
American authors for me!
</p></p>
<a
href=
"/books"
>
Books
</a>
&
nbsp
&
nbsp
&
nbsp
&
nbsp
&
nbsp
<a
href=
"/authors"
>
Authors
</a>
{% endblock %}
{% endblock %}
\ No newline at end of file
bookshelf/views.py
View file @
2d9eaad6
...
@@ -5,11 +5,22 @@ from django.template import loader
...
@@ -5,11 +5,22 @@ from django.template import loader
from
django.shortcuts
import
render
from
django.shortcuts
import
render
# views for Home (landing page)
def
home
(
request
):
def
home
(
request
):
context
=
{}
context
=
{}
template
=
loader
.
get_template
(
'home/index.html'
)
template
=
loader
.
get_template
(
'home/index.html'
)
return
HttpResponse
(
template
.
render
(
context
,
request
))
return
HttpResponse
(
template
.
render
(
context
,
request
))
# for Authors page
def
authors
(
request
):
def
authors
(
request
):
return
context
=
{}
template
=
loader
.
get_template
(
'authors/index.html'
)
return
HttpResponse
(
template
.
render
(
context
,
request
))
# for Books page
def
books
(
request
):
def
books
(
request
):
return
context
=
{}
\ No newline at end of file
template
=
loader
.
get_template
(
'books/index.html'
)
return
HttpResponse
(
template
.
render
(
context
,
request
))
\ No newline at end of file
templates/base.html
View file @
2d9eaad6
...
@@ -8,5 +8,6 @@
...
@@ -8,5 +8,6 @@
<div
class=
"container"
>
<div
class=
"container"
>
{% block content %}{% endblock %}
{% block content %}{% endblock %}
</div>
</div>
<a
href=
"/books"
>
Books
</a>
&
nbsp
&
nbsp
&
nbsp
&
nbsp
&
nbsp
<a
href=
"/authors"
>
Authors
</a>
</body>
</body>
</html>
</html>
\ 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