Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
migs_atienza_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
Migs Atienza
migs_atienza_reading
Commits
53587adc
Commit
53587adc
authored
Apr 13, 2023
by
Migs Atienza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created authors.html
parent
6781d806
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
1 deletion
+32
-1
urls.cpython-39.pyc
...atienza_reading/bookshelf/__pycache__/urls.cpython-39.pyc
+0
-0
views.cpython-39.pyc
...tienza_reading/bookshelf/__pycache__/views.cpython-39.pyc
+0
-0
authors.html
...tienza_reading/bookshelf/templates/bookshelf/authors.html
+19
-0
urls.py
migs_atienza_reading/bookshelf/urls.py
+3
-1
views.py
migs_atienza_reading/bookshelf/views.py
+10
-0
No files found.
migs_atienza_reading/bookshelf/__pycache__/urls.cpython-39.pyc
View file @
53587adc
No preview for this file type
migs_atienza_reading/bookshelf/__pycache__/views.cpython-39.pyc
View file @
53587adc
No preview for this file type
migs_atienza_reading/bookshelf/templates/bookshelf/authors.html
0 → 100644
View file @
53587adc
{% extends 'base.html' %}
{% block title %}My Favorite Authors{% endblock %}
{% block heading %}
<center>
Migs' Favorite Authors
</center>
{% endblock %}
{% block content %}
<center>
<ul>
{% for object in object_list %}
<li>
<a
href=
"{{ object.get_absolute_url }}"
>
{{ object.first_name }} {{ object.last_name }}
</a>
</li>
{% endfor %}
</ul>
</center>
{% endblock %}
{% block links %}
<center><br/><br/><br/><br/><br/>
<a
href=
"home"
>
Home
</a>
<a
href=
"books"
>
Books
</a></center>
{% endblock %}
\ No newline at end of file
migs_atienza_reading/bookshelf/urls.py
View file @
53587adc
from
django.urls
import
path
from
django.urls
import
path
from
.views
import
index
,
home_view
,
BooksListView
,
BooksDetailView
from
.views
import
index
,
home_view
,
BooksListView
,
BooksDetailView
,
AuthorsListView
,
AuthorsDetailView
urlpatterns
=
[
urlpatterns
=
[
path
(
''
,
index
,
name
=
'index'
),
path
(
''
,
index
,
name
=
'index'
),
path
(
'home'
,
home_view
,
name
=
'home_view'
),
path
(
'home'
,
home_view
,
name
=
'home_view'
),
path
(
'books'
,
BooksListView
.
as_view
(),
name
=
'books_list'
),
path
(
'books'
,
BooksListView
.
as_view
(),
name
=
'books_list'
),
path
(
'books/<int:pk>/details'
,
BooksDetailView
.
as_view
(),
name
=
'books_details'
),
path
(
'books/<int:pk>/details'
,
BooksDetailView
.
as_view
(),
name
=
'books_details'
),
path
(
'authors'
,
AuthorsListView
.
as_view
(),
name
=
'authors_list'
),
path
(
'authors/<int:pk>/details'
,
AuthorsDetailView
.
as_view
(),
name
=
'authors_details'
),
]
]
app_name
=
"<bookshelf>"
app_name
=
"<bookshelf>"
...
...
migs_atienza_reading/bookshelf/views.py
View file @
53587adc
...
@@ -22,4 +22,14 @@ class BooksListView(ListView):
...
@@ -22,4 +22,14 @@ class BooksListView(ListView):
class
BooksDetailView
(
DetailView
):
class
BooksDetailView
(
DetailView
):
model
=
Book
model
=
Book
template_name
=
"bookshelf/books_details.html"
template_name
=
"bookshelf/books_details.html"
class
AuthorsListView
(
ListView
):
model
=
Author
template_name
=
"bookshelf/authors.html"
class
AuthorsDetailView
(
DetailView
):
model
=
Author
template_name
=
"bookshelf/authors_details.html"
# Create your views here.
# Create your views here.
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