Commit bb73421e authored by Karlo Cabugwang's avatar Karlo Cabugwang

heroes app contains info for html, main page not updated yet

parent 0eeccc43
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class HeroesConfig(AppConfig):
name = 'heroes'
from django.db import models
# Create your models here.
<!DOCTYPE html>
<html>
<head>
<title>Detail - Cloud</title>
</head>
<body>
<img src="https://opengameart.org/content/violet-cloud" style="width: 10vw;" />
<h1>Detail - Cloud</h1>
<dl>
<dt>Health Points</dt><dd>600</dd>
<dt>Base Attack Damage</dt><dd>57</dd>
<dt>Skills</dt><dd>Nimbus, Rain Cloud, Thunderbolt</dd>
<dt>Lore</dt><dd>I am a cloud. When I pee you call it 'rain'.</dd>
</dl>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Detail - Jester</title>
</head>
<body>
<img src="./jester.png" style="width: 10vw;"/>
<h1>Detail - Jester</h1>
<dl>
<dt>Health Points</dt><dd>660</dd>
<dt>Base Attack Damage</dt><dd>64</dd>
<dt>Skills</dt><dd>Laugh, Dance, Smile</dd>
<dt>Lore</dt><dd>I do it for the LOLs.</dd>
</dl>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Detail - Sunflowey</title>
</head>
<body>
<img src="./sunflowey.png" style="width: 10vw;" />
<h1>Detail - Sunflowey</h1>
<dl>
<dt>Health Points</dt><dd>650</dd>
<dt>Base Attack Damage</dt><dd>43</dd>
<dt>Skills</dt><dd>Power Pellet, Sunshine, Pollen Punch</dd>
<dt>Lore</dt><dd>I am Sunflowey. Sometimes a sun, sometimes a flower.</dd>
</dl>
</body>
</html>
\ No newline at end of file
<html>
<title>The Will of the Wisps Wiki</title>
<body>
<h1>The Will of the Wisps Wiki</h1>
<ul>
<li><a href="/heroes/cloud">Cloud</a>
<dt>Health Points - 600</dt>
<dt>Base Attack Damage - 57</dt>
</li>
<li><a href="/detail_cloud.html">Cloud</a></li>
<li><a href="/detail_cloud.html">Cloud</a></li>
</ul>
</body>
</html>
\ No newline at end of file
from django.urls import resolve
from django.test import TestCase
from .views import HeroesView
# , CloudView, SunfloweyView, JesterView
class HeroesPageTest(TestCase):
def test_uses_heroes_template(self):
response = self.client.get('/heroes')
self.assertTemplateUsed(response,'heroes.html')
# class CloudPageTest(TestCase):
# def test_uses_cloud_template(self):
# response = self.client.get('/heroes/cloud')
# self.assertTemplateUsed(response,'detail_cloud.html')
# class JesterPageTest(TestCase):
# def test_uses_jester_template(self):
# response = self.client.get('/heroes/jester')
# self.assertTemplateUsed(response,'detail_jester.html')
# class SunfloweyPageTest(TestCase):
# def test_uses_sunflowey_template(self):
# response = self.client.get('/heroes/sunflowey')
# self.assertTemplateUsed(response,'detail_sunflowey.html')
\ No newline at end of file
from django.conf.urls import url
from .views import HeroesView, CloudView
# ,, SunfloweyView, JesterView
urlpatterns = [
url(r'^heroes$', HeroesView.as_view(), name='heroes'),
url(r'^heroes/cloud$', CloudView.as_view(), name='cloud')
# url(r'^heroes/jester$', JesterView.as_view(), name='jester'),
# url(r'^heroes/sunflowey$', SunfloweyView.as_view(), name='sunflowey'),
]
\ No newline at end of file
from django.views.generic.base import TemplateView
class HeroesView(TemplateView):
template_name = "heroes.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