Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
Lab01
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
Dan Mark Restoles
Lab01
Commits
fdededa0
Commit
fdededa0
authored
Mar 06, 2020
by
Dan Mark Restoles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first test passed
parent
37b82c42
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
23 additions
and
7 deletions
+23
-7
__init__.cpython-38.pyc
heroes/__pycache__/__init__.cpython-38.pyc
+0
-0
admin.cpython-38.pyc
heroes/__pycache__/admin.cpython-38.pyc
+0
-0
models.cpython-38.pyc
heroes/__pycache__/models.cpython-38.pyc
+0
-0
tests.cpython-38.pyc
heroes/__pycache__/tests.cpython-38.pyc
+0
-0
urls.cpython-38.pyc
heroes/__pycache__/urls.cpython-38.pyc
+0
-0
views.cpython-38.pyc
heroes/__pycache__/views.cpython-38.pyc
+0
-0
__init__.cpython-38.pyc
heroes/migrations/__pycache__/__init__.cpython-38.pyc
+0
-0
tests.py
heroes/tests.py
+8
-1
urls.py
heroes/urls.py
+2
-2
views.py
heroes/views.py
+10
-2
__init__.cpython-38.pyc
willowisp/__pycache__/__init__.cpython-38.pyc
+0
-0
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
+2
-2
No files found.
heroes/__pycache__/__init__.cpython-38.pyc
0 → 100644
View file @
fdededa0
File added
heroes/__pycache__/admin.cpython-38.pyc
0 → 100644
View file @
fdededa0
File added
heroes/__pycache__/models.cpython-38.pyc
0 → 100644
View file @
fdededa0
File added
heroes/__pycache__/tests.cpython-38.pyc
0 → 100644
View file @
fdededa0
File added
heroes/__pycache__/urls.cpython-38.pyc
0 → 100644
View file @
fdededa0
File added
heroes/__pycache__/views.cpython-38.pyc
0 → 100644
View file @
fdededa0
File added
heroes/migrations/__pycache__/__init__.cpython-38.pyc
0 → 100644
View file @
fdededa0
File added
heroes/tests.py
View file @
fdededa0
from
django.test
import
TestCase
from
django.urls
import
resolve
from
.views
import
HeroesView
,
CloudView
,
JesterView
,
SunfloweyView
# Create your tests here.
class
HeroesPageTest
(
TestCase
):
def
test_root_url_resolves_to_heroes_page_view
(
self
):
found
=
resolve
(
'/heroes/'
)
self
.
assertEqual
(
found
.
func
.
__name__
,
HeroesView
.
as_view
()
.
__name__
)
\ No newline at end of file
heroes/urls.py
View file @
fdededa0
from
django.conf.urls
import
url
from
.views
import
HeroesView
,
Hero
View
from
.views
import
HeroesView
,
CloudView
,
JesterView
,
Sunflowey
View
urlpatterns
=
[
url
(
r'
/heroes
'
,
HeroesView
.
as_view
(),
name
=
'Heroes'
),
url
(
r'
^heroes/
'
,
HeroesView
.
as_view
(),
name
=
'Heroes'
),
]
\ No newline at end of file
heroes/views.py
View file @
fdededa0
...
...
@@ -6,7 +6,15 @@ class HeroesView(TemplateView):
template_name
=
'list_heroes.html'
class
HeroView
(
TemplateView
):
template_name
=
"detail"
class
CloudView
(
TemplateView
):
template_name
=
"detail_cloud.html"
class
JesterView
(
TemplateView
):
template_name
=
"detail_jester.html"
class
SunfloweyView
(
TemplateView
):
template_name
=
"detail_sunflowey.html"
\ No newline at end of file
willowisp/__pycache__/__init__.cpython-38.pyc
0 → 100644
View file @
fdededa0
File added
willowisp/__pycache__/settings.cpython-38.pyc
0 → 100644
View file @
fdededa0
File added
willowisp/__pycache__/urls.cpython-38.pyc
0 → 100644
View file @
fdededa0
File added
willowisp/settings.py
View file @
fdededa0
...
...
@@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'heroes'
,
]
MIDDLEWARE
=
[
...
...
willowisp/urls.py
View file @
fdededa0
...
...
@@ -13,9 +13,9 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from
django.conf.urls
import
url
from
django.conf.urls
import
url
,
include
from
django.contrib
import
admin
urlpatterns
=
[
url
(
r'^
admin/'
,
admin
.
site
.
urls
),
url
(
r'^
'
,
include
(
'heroes.urls'
)
),
]
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