Commit 3f7c8c5b authored by martin0726's avatar martin0726

Added urls.py

parent e380fb21
......@@ -15,14 +15,14 @@ class heroCloudTest(TestCase):
self.assertTemplateUsed(response, 'detail_cloud.html')
class heroSunflowey(TestCase):
class heroSunfloweyTest(TestCase):
def test_hero_sunflowey_page_returns_correct_html(self):
response = self.client.get('/heroes/sunflowey')
self.assertTemplateUsed(response, 'detail_sunflowey.html')
class heroJester(TestCase):
class heroJesterTest(TestCase):
def test_hero_jester_page_returns_correct_html(self):
response = self.client.get('/heroes/jester')
......
from django.conf.urls import url
from .views import HomeView, TaskListView, TaskCreateView
from .views import heroesView, cloudView, sunfloweyView, jesterView
urlpatterns = [
url(r'^$', HomeView.as_view(), name='home'),
url(r'^tasks$', TaskListView.as_view(), name='task-list'),
url(r'^tasks/new$', TaskCreateView.as_view(), name='task_create')
url(r'^heroes/$', heroesView.as_view(), name='heroes'),
url(r'^heroes/cloud$', cloudView.as_view(), name='Cloud'),
url(r'^heroes/sunflowey$', sunfloweyView.as_view(), name='Sunflowey')
url(r'^heroes/jester$', jesterView.as_view(), name='Jester')
]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment