Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
justinreyes_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
Justin Reyes
justinreyes_reading
Commits
8392e27c
Commit
8392e27c
authored
Mar 27, 2023
by
justin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialized homepage and base URL routing
parent
a04ee101
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
4 deletions
+50
-4
home.html
justinreyes_reading/bookshelf/templates/bookshelf/home.html
+13
-0
urls.py
justinreyes_reading/bookshelf/urls.py
+6
-0
views.py
justinreyes_reading/bookshelf/views.py
+12
-1
db.sqlite3
justinreyes_reading/db.sqlite3
+0
-0
settings.py
justinreyes_reading/justinreyes_reading/settings.py
+2
-1
urls.py
justinreyes_reading/justinreyes_reading/urls.py
+3
-2
base.html
justinreyes_reading/templates/base.html
+14
-0
No files found.
justinreyes_reading/bookshelf/templates/bookshelf/home.html
0 → 100644
View file @
8392e27c
{% extends 'base.html' %} {% block content %}
<h1>
Welcome to Justin's Database of Favorite Books and Authors!
</h1>
<p>
I love all types of books, and most of the ones I read are just
recommendations made to me by different people, especially my girlfriend. I
love reading horror, biographies, and more. Thanks!
</p>
<ul>
<li><a
href=
"/books"
>
Books
</a></li>
<li><a
href=
"/authors"
>
Authors
</a></li>
</ul>
{% endblock %}
justinreyes_reading/bookshelf/urls.py
0 → 100644
View file @
8392e27c
from
django.urls
import
path
from
.views
import
index
urlpatterns
=
[
path
(
""
,
index
,
name
=
"home"
),
]
justinreyes_reading/bookshelf/views.py
View file @
8392e27c
from
django.shortcuts
import
render
from
django.views
import
View
# Create your views here.
def
index
(
request
):
return
render
(
request
,
"bookshelf/home.html"
,
)
# class HomePageView(View):
# def get(self, request):
# return (render, "bookshelf/home.html")
justinreyes_reading/db.sqlite3
View file @
8392e27c
No preview for this file type
justinreyes_reading/justinreyes_reading/settings.py
View file @
8392e27c
...
...
@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/4.1/ref/settings/
"""
from
pathlib
import
Path
import
os
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR
=
Path
(
__file__
)
.
resolve
()
.
parent
.
parent
...
...
@@ -55,7 +56,7 @@ ROOT_URLCONF = "justinreyes_reading.urls"
TEMPLATES
=
[
{
"BACKEND"
:
"django.template.backends.django.DjangoTemplates"
,
"DIRS"
:
[],
"DIRS"
:
[
os
.
path
.
join
(
BASE_DIR
),
"templates"
],
"APP_DIRS"
:
True
,
"OPTIONS"
:
{
"context_processors"
:
[
...
...
justinreyes_reading/justinreyes_reading/urls.py
View file @
8392e27c
...
...
@@ -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
(
"admin/"
,
admin
.
site
.
urls
),
path
(
"home/"
,
include
(
"bookshelf.urls"
)),
]
justinreyes_reading/templates/base.html
0 → 100644
View file @
8392e27c
<html
lang=
"en"
>
<head>
<link
rel=
"stylesheet"
href=
"style.css"
/>
<title>
{% block title %} My Favorite Books and Authors {% endblock %}
</title>
{% block styles %}{% endblock %}
</head>
<body>
<div
id=
"content"
>
{% block content %}{% endblock %}
</div>
{% block scripts %}{% endblock %}
</body>
</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