Commit c845fe22 authored by Jay Lopez's avatar Jay Lopez

finished loading of homepage, begin dealing with detail pages

parent b517844a
......@@ -13,7 +13,7 @@ class NewVisitorTest(unittest.TestCase):
def test_can_display_a_heroes_list_and_more_information_per_hero(self):
# Widget has heard about a new wiki app for the game called The Will of the Wisps.
# She goes to check out its homepage
self.browser.get('https://localhost:8000/heroes')
self.browser.get('http://localhost:8000/heroes')
# She notices the page title and header mention
# 'The Will of the Wisps Wiki'
......@@ -42,5 +42,6 @@ class NewVisitorTest(unittest.TestCase):
self.fail('Finish the test!')
if __name__ == '__main__':
unittest.main(warnings='ignore')
\ No newline at end of file
<html>
<title>The Will of the Wisps Wiki</title>
<h1>Will of the Wisps</h1>
<h4>Heroes</h4>
<ul>
<li><a href='/hero/cloud/'>Cloud (600 HP, 57 ATK)</a></li>
<li><a href='/hero/jester/'>Jester (660 HP, 64 ATK)</a></li>
<li><a href='/hero/sunflowey/'>Sunflowey (650 HP, 43 ATK)</a></li>
</ul>
</html>
\ No newline at end of file
......@@ -2,5 +2,8 @@ from django.conf.urls import url
from .views import *
urlpatterns = [
url(r'^heroes$', HomeView.as_view(), name='index'),
url(r'^hero/cloud$', CloudView.as_view()),
url(r'^hero/sunflowey$', SunfloweyView.as_view()),
url(r'^hero/jester$', JesterView.as_view())
]
\ No newline at end of file
from django.shortcuts import render
from django.generic.base import TemplateView
from django.views.generic.base import TemplateView
# Create your views here.
class HomeView(TemplateView):
template_name = 'home.html'
\ No newline at end of file
template_name = 'index.html'
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
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