Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
will-o-wisp
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
Santino Campos
will-o-wisp
Commits
4575749f
Commit
4575749f
authored
Mar 07, 2020
by
Santino Campos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix displaying of static images in website
parent
0424be22
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
5 deletions
+13
-5
detail_cloud.html
heroes/templates/detail_cloud.html
+3
-1
detail_jester.html
heroes/templates/detail_jester.html
+2
-1
detail_sunflowey.html
heroes/templates/detail_sunflowey.html
+2
-1
lab1_functional_test.py
lab1_functional_test.py
+1
-1
settings.py
willowisp/settings.py
+5
-1
No files found.
heroes/templates/detail_cloud.html
View file @
4575749f
{% load static %}
<!DOCTYPE html>
<html>
<head>
<title>
Detail - Cloud
</title>
</head>
<body>
<img
src=
"./cloud.png"
style=
"width: 10vw;"
/>
<img
src=
'{% static "cloud.png" %}'
style=
"width: 10vw;"
/>
<h1>
Detail - Cloud
</h1>
<dl>
<dt>
Health Points
</dt><dd>
600
</dd>
...
...
heroes/templates/detail_jester.html
View file @
4575749f
{% load static %}
<!DOCTYPE html>
<html>
<head>
<title>
Detail - Jester
</title>
</head>
<body>
<img
src=
"./jester.png"
style=
"width: 10vw;"
/>
<img
src=
"{% static "
jester
.
png
"
%}"
style=
"width: 10vw;"
/>
<h1>
Detail - Jester
</h1>
<dl>
<dt>
Health Points
</dt><dd>
660
</dd>
...
...
heroes/templates/detail_sunflowey.html
View file @
4575749f
{% load static %}
<!DOCTYPE html>
<html>
<head>
<title>
Detail - Sunflowey
</title>
</head>
<body>
<img
src=
"./sunflowey.png"
style=
"width: 10vw;"
/>
<img
src=
'{% static "sunflowey.png" %}'
style=
"width: 10vw;"
/>
<h1>
Detail - Sunflowey
</h1>
<dl>
<dt>
Health Points
</dt><dd>
650
</dd>
...
...
lab1_functional_test.py
View file @
4575749f
...
...
@@ -26,7 +26,7 @@ class NewVisitorTest(unittest.TestCase):
# containing more information about the hero (additional stats, lore, image).
self
.
browser
.
get
(
'http://localhost:8000/hero/sunflowey'
)
self
.
assertIn
(
'<img src="
.
/sunflowey.png" style="width: 10vw;">'
,
self
.
browser
.
page_source
)
self
.
assertIn
(
'<img src="
/heroes/templates
/sunflowey.png" style="width: 10vw;">'
,
self
.
browser
.
page_source
)
self
.
assertIn
(
'<dt>Health Points</dt><dd>650</dd>'
,
self
.
browser
.
page_source
)
self
.
assertIn
(
'<dt>Base Attack Damage</dt><dd>43</dd>'
,
self
.
browser
.
page_source
)
self
.
assertIn
(
'<dt>Skills</dt><dd>Power Pellet, Sunshine, Pollen Punch</dd>'
,
self
.
browser
.
page_source
)
...
...
willowisp/settings.py
View file @
4575749f
...
...
@@ -118,4 +118,8 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.11/howto/static-files/
STATIC_URL
=
'/static/'
STATIC_URL
=
'/heroes/templates/'
STATICFILES_DIRS
=
(
os
.
path
.
join
(
BASE_DIR
,
'heroes/templates'
),
)
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