Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lab-1-wang-alec-185292-willowisp
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
Alec
lab-1-wang-alec-185292-willowisp
Commits
102e763b
Commit
102e763b
authored
Mar 07, 2020
by
Alec Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added static directory settings to settings.py file
parent
4aca0776
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
5 deletions
+13
-5
urls.cpython-38.pyc
heroes/__pycache__/urls.cpython-38.pyc
+0
-0
detail_cloud.html
heroes/templates/detail_cloud.html
+2
-1
urls.py
heroes/urls.py
+6
-2
settings.cpython-38.pyc
willowisp/__pycache__/settings.cpython-38.pyc
+0
-0
urls.cpython-38.pyc
willowisp/__pycache__/urls.cpython-38.pyc
+0
-0
settings.py
willowisp/settings.py
+1
-0
urls.py
willowisp/urls.py
+4
-2
No files found.
heroes/__pycache__/urls.cpython-38.pyc
View file @
102e763b
No preview for this file type
heroes/templates/detail_cloud.html
View file @
102e763b
{% load static %}
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
...
@@ -6,7 +7,7 @@
...
@@ -6,7 +7,7 @@
</head>
</head>
<body>
<body>
<img
src=
"
./cloud.png"
style=
"
width: 10vw;"
/>
<img
src=
"
{% static "
./
cloud
.
png
"
%}"
style=
"
width: 10vw;"
/>
<h1>
Detail - Cloud
</h1>
<h1>
Detail - Cloud
</h1>
<dl>
<dl>
<dt>
Health Points
</dt>
<dt>
Health Points
</dt>
...
...
heroes/urls.py
View file @
102e763b
from
django.conf.urls
import
url
from
django.conf
import
settings
from
django.contrib
import
admin
from
django.conf.urls
import
include
,
url
from
django.conf.urls.static
import
static
from
.views
import
*
from
.views
import
*
urlpatterns
=
[
urlpatterns
=
[
...
@@ -6,4 +10,4 @@ urlpatterns = [
...
@@ -6,4 +10,4 @@ urlpatterns = [
url
(
r'^hero/cloud$'
,
hero_cloud
,
name
=
"hero_cloud"
),
url
(
r'^hero/cloud$'
,
hero_cloud
,
name
=
"hero_cloud"
),
url
(
r'^hero/sunflowey$'
,
hero_sunflowey
,
name
=
"hero_sunflowey"
),
url
(
r'^hero/sunflowey$'
,
hero_sunflowey
,
name
=
"hero_sunflowey"
),
url
(
r'^hero/jester$'
,
hero_jester
,
name
=
"hero_jester"
),
url
(
r'^hero/jester$'
,
hero_jester
,
name
=
"hero_jester"
),
]
]
+
static
(
settings
.
STATIC_URL
,
document_root
=
settings
.
STATIC_ROOT
)
willowisp/__pycache__/settings.cpython-38.pyc
View file @
102e763b
No preview for this file type
willowisp/__pycache__/urls.cpython-38.pyc
View file @
102e763b
No preview for this file type
willowisp/settings.py
View file @
102e763b
...
@@ -119,3 +119,4 @@ USE_TZ = True
...
@@ -119,3 +119,4 @@ USE_TZ = True
# https://docs.djangoproject.com/en/1.11/howto/static-files/
# https://docs.djangoproject.com/en/1.11/howto/static-files/
STATIC_URL
=
'/static/'
STATIC_URL
=
'/static/'
STATICFILES_DIRS
=
(
os
.
path
.
join
(
BASE_DIR
,
"heroes/templates/"
),)
willowisp/urls.py
View file @
102e763b
...
@@ -13,10 +13,12 @@ Including another URLconf
...
@@ -13,10 +13,12 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
"""
from
django.conf
.urls
import
include
,
url
from
django.conf
import
settings
from
django.contrib
import
admin
from
django.contrib
import
admin
from
django.conf.urls
import
include
,
url
from
django.conf.urls.static
import
static
urlpatterns
=
[
urlpatterns
=
[
url
(
r'^admin/'
,
admin
.
site
.
urls
),
url
(
r'^admin/'
,
admin
.
site
.
urls
),
url
(
r''
,
include
(
'heroes.urls'
)),
url
(
r''
,
include
(
'heroes.urls'
)),
]
]
+
static
(
settings
.
STATIC_URL
,
document_root
=
settings
.
STATIC_ROOT
)
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