Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trishamillena_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
Trisha Angel Millena
trishamillena_reading
Commits
969e248f
Commit
969e248f
authored
Mar 28, 2023
by
Trisha Angel Millena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created Homepage: made home.html and edited urls.py under bookself
parent
08b98b31
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
5 deletions
+22
-5
home.html
...hamillena_reading/bookshelf/templates/bookshelf/home.html
+15
-0
urls.py
trishamillena_reading/bookshelf/urls.py
+2
-2
views.py
trishamillena_reading/bookshelf/views.py
+3
-2
settings.py
trishamillena_reading/trishamillena_reading/settings.py
+2
-1
No files found.
trishamillena_reading/bookshelf/templates/bookshelf/home.html
0 → 100644
View file @
969e248f
{% extends 'base.html' %}
{% load static %}
{% block title %}My Favorite Books and Authors{% endblock %}
{% block content %}
<h1>
Welcome to Trisha's Database of Favorite Books and Authors!
</h1>
<p>
The genres I enjoy reading are a mix of Romance and Mystery. I try to explore works of different authors most of the time.
</p>
<a
href =
'/bookshelf/books/'
>
Books
</a>
<a
href =
'/bookshelf/authors/'
>
Authors
</a>
{% endblock %}
trishamillena_reading/bookshelf/urls.py
View file @
969e248f
from
django.urls
import
path
from
django.urls
import
path
from
.
views
import
index
from
.
import
views
urlpatterns
=
[
urlpatterns
=
[
path
(
'
'
,
index
,
name
=
'index
'
),
path
(
'
home/'
,
views
.
home
,
name
=
'home
'
),
]
]
app_name
=
"bookshelf"
app_name
=
"bookshelf"
\ No newline at end of file
trishamillena_reading/bookshelf/views.py
View file @
969e248f
from
django.http
import
HttpResponse
from
django.http
import
HttpResponse
from
django.shortcuts
import
render
# Create your views here.
# Create your views here.
def
index
(
request
):
def
home
(
request
):
return
HttpResponse
(
''
)
return
render
(
request
,
'bookshelf/home.html'
)
\ No newline at end of file
\ No newline at end of file
trishamillena_reading/trishamillena_reading/settings.py
View file @
969e248f
...
@@ -59,7 +59,7 @@ ROOT_URLCONF = 'trishamillena_reading.urls'
...
@@ -59,7 +59,7 @@ ROOT_URLCONF = 'trishamillena_reading.urls'
TEMPLATES
=
[
TEMPLATES
=
[
{
{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'DIRS'
:
[],
'DIRS'
:
[
os
.
path
.
join
(
BASE_DIR
,
'templates'
)
],
'APP_DIRS'
:
True
,
'APP_DIRS'
:
True
,
'OPTIONS'
:
{
'OPTIONS'
:
{
'context_processors'
:
[
'context_processors'
:
[
...
@@ -123,6 +123,7 @@ USE_TZ = True
...
@@ -123,6 +123,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.2/howto/static-files/
# https://docs.djangoproject.com/en/3.2/howto/static-files/
STATIC_URL
=
'/static/'
STATIC_URL
=
'/static/'
STATICFILES_DIRS
=
[
os
.
path
.
join
(
BASE_DIR
,
'static'
)]
# Default primary key field type
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
...
...
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