Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gabigarrero_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
Gabriel G. Garrero
gabigarrero_reading
Commits
10e37df4
Commit
10e37df4
authored
Mar 28, 2023
by
Gabriel G. Garrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created html files for Books, Book Details, Authors, and Author Details and updated urls.py
parent
7e998f74
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
8 deletions
+61
-8
author_details.html
...reading/bookshelf/templates/bookshelf/author_details.html
+9
-0
authors.html
...arrero_reading/bookshelf/templates/bookshelf/authors.html
+9
-0
book_details.html
...o_reading/bookshelf/templates/bookshelf/book_details.html
+9
-0
books.html
gabigarrero_reading/bookshelf/templates/bookshelf/books.html
+9
-0
home.html
gabigarrero_reading/bookshelf/templates/bookshelf/home.html
+1
-1
urls.py
gabigarrero_reading/bookshelf/urls.py
+4
-0
views.py
gabigarrero_reading/bookshelf/views.py
+17
-4
base.html
gabigarrero_reading/templates/base.html
+3
-3
No files found.
gabigarrero_reading/bookshelf/templates/bookshelf/author_details.html
0 → 100644
View file @
10e37df4
{% extends 'base.html' %}
{% load static %}
{% block title %}{% endblock %}
{% block content %}
{% endblock %}
\ No newline at end of file
gabigarrero_reading/bookshelf/templates/bookshelf/authors.html
0 → 100644
View file @
10e37df4
{% extends 'base.html' %}
{% load static %}
{% block title %}{% endblock %}
{% block content %}
{% endblock %}
\ No newline at end of file
gabigarrero_reading/bookshelf/templates/bookshelf/book_details.html
0 → 100644
View file @
10e37df4
{% extends 'base.html' %}
{% load static %}
{% block title %}{% endblock %}
{% block content %}
{% endblock %}
\ No newline at end of file
gabigarrero_reading/bookshelf/templates/bookshelf/books.html
0 → 100644
View file @
10e37df4
{% extends 'base.html' %}
{% load static %}
{% block title %}{% endblock %}
{% block content %}
{% endblock %}
\ No newline at end of file
gabigarrero_reading/bookshelf/templates/bookshelf/home.html
View file @
10e37df4
...
...
@@ -5,7 +5,7 @@
{% block title %}My Favorite Books
&
Authors{% endblock %}
{% block content %}
<h1
id=
"hello"
>
Welcome to Gabi's Database of Favorite Books and Authors!
</h1>
<h1>
Welcome to Gabi's Database of Favorite Books and Authors!
</h1>
<p>
I don't read books.
</p>
...
...
gabigarrero_reading/bookshelf/urls.py
View file @
10e37df4
...
...
@@ -3,6 +3,10 @@ from . import views
urlpatterns
=
[
path
(
'home/'
,
views
.
home
,
name
=
'home'
),
path
(
'books/'
,
views
.
BooksListView
.
as_view
(),
name
=
'books-list'
),
path
(
'books/<int:pk>/details'
,
views
.
BooksDetailView
.
as_view
(),
name
=
'books-details'
),
path
(
'authors/'
,
views
.
AuthorListView
.
as_view
(),
name
=
'author-list'
),
path
(
'authors/<int:pk>/details'
,
views
.
AuthorDetailView
.
as_view
(),
name
=
'author-details'
),
]
app_name
=
"bookshelf"
\ No newline at end of file
gabigarrero_reading/bookshelf/views.py
View file @
10e37df4
from
django.http
import
HttpResponse
from
.models
import
Author
,
Books
from
django.template
import
loader
from
django.shortcuts
import
render
from
django.views
import
View
from
django.views.generic.list
import
ListView
from
django.views.generic.detail
import
DetailView
from
.models
import
Author
,
Books
def
home
(
request
):
return
render
(
request
,
'bookshelf/home.html'
)
\ No newline at end of file
return
render
(
request
,
'bookshelf/home.html'
)
class
BooksListView
(
ListView
):
model
=
Books
class
BooksDetailView
(
DetailView
):
model
=
Books
class
AuthorListView
(
ListView
):
model
=
Author
class
AuthorDetailView
(
DetailView
):
model
=
Author
\ No newline at end of file
gabigarrero_reading/templates/base.html
View file @
10e37df4
<!DOCTYPE html>
<html
lang
=
"en"
>
<html
lang
=
"en"
>
<head>
<link
rel
=
"stylesheet"
href=
"/static/styles.css"
>
<link
rel
=
"stylesheet"
href =
"/static/styles.css"
>
<title>
{% block title %}My amazing site{% endblock %}
</title>
{% block styles %}{% endblock %}
</head>
<body>
<div
id
=
"content"
>
<div
id
=
"content"
>
{% block content %}{% endblock %}
</div>
{% block scripts %}{% endblock %}
...
...
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