Commit fa75029c authored by Kirby Ezekiel Santos's avatar Kirby Ezekiel Santos

Added home page html file

parent 232a121e
from django.contrib import admin
from django.urls import path
from .views import go_to_home_page
urlpatterns = [
path('', go_to_home_page),
]
from django.shortcuts import render from django.shortcuts import render
# Create your views here. # Create your views here.
home_page = "home_page.html"
def go_to_home_page(request):
return render(request, home_page)
...@@ -24,7 +24,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -24,7 +24,7 @@ class NewVisitorTest(unittest.TestCase):
#Find the ingredients section #Find the ingredients section
home_page_ingredients = self.browser.find_element_by_id("home_page_ingredients") home_page_ingredients = self.browser.find_element_by_id("home_page_ingredients")
self.assertEqual( self.assertEqual(
home_page_inredients.get_attribute("innerHTML"), home_page_ingredients.get_attribute("innerHTML"),
"Ingredients" "Ingredients"
) )
...@@ -34,7 +34,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -34,7 +34,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/ingredients-list", "http://localhost:8000/ingredients-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at ingredients list title and header #Look at ingredients list title and header
...@@ -51,7 +51,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -51,7 +51,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/ingredients-detail", "http://localhost:8000/ingredients-detail",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at ingredients detail title and header #Look at ingredients detail title and header
...@@ -68,7 +68,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -68,7 +68,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/ingredients-list", "http://localhost:8000/ingredients-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find and click button to ingredients update #Find and click button to ingredients update
...@@ -77,7 +77,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -77,7 +77,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/ingredients-update", "http://localhost:8000/ingredients-update",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at ingredients update title and header #Look at ingredients update title and header
...@@ -94,7 +94,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -94,7 +94,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/ingredients-list", "http://localhost:8000/ingredients-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find and click button to ingredients create #Find and click button to ingredients create
...@@ -103,7 +103,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -103,7 +103,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/ingredients-create", "http://localhost:8000/ingredients-create",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at ingredients update title and header #Look at ingredients update title and header
...@@ -120,7 +120,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -120,7 +120,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/ingredients-list", "http://localhost:8000/ingredients-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find and click back button to home page #Find and click back button to home page
...@@ -129,7 +129,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -129,7 +129,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000", "http://localhost:8000",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find the recipes section #Find the recipes section
...@@ -145,7 +145,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -145,7 +145,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/recipes-list", "http://localhost:8000/recipes-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at recipes list title and header #Look at recipes list title and header
...@@ -162,7 +162,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -162,7 +162,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/recipes-detail", "http://localhost:8000/recipes-detail",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at recipes detail title and header #Look at recipes detail title and header
...@@ -179,7 +179,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -179,7 +179,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/recipes-list", "http://localhost:8000/recipes-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find and click button to recipes update #Find and click button to recipes update
...@@ -188,7 +188,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -188,7 +188,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/recipes-update", "http://localhost:8000/recipes-update",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at recipes update title and header #Look at recipes update title and header
...@@ -205,7 +205,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -205,7 +205,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/recipes-list", "http://localhost:8000/recipes-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find and click button to recipes create #Find and click button to recipes create
...@@ -214,7 +214,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -214,7 +214,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/recipes-create", "http://localhost:8000/recipes-create",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at recipes update title and header #Look at recipes update title and header
...@@ -231,7 +231,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -231,7 +231,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/recipes-list", "http://localhost:8000/recipes-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find and click back button to home page #Find and click back button to home page
...@@ -240,7 +240,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -240,7 +240,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000", "http://localhost:8000",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find the orders section #Find the orders section
...@@ -256,7 +256,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -256,7 +256,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/orders-list", "http://localhost:8000/orders-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at orders list title and header #Look at orders list title and header
...@@ -273,7 +273,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -273,7 +273,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/orders-detail", "http://localhost:8000/orders-detail",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at orders detail title and header #Look at orders detail title and header
...@@ -290,7 +290,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -290,7 +290,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/orders-list", "http://localhost:8000/orders-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find and click button to orders update #Find and click button to orders update
...@@ -299,7 +299,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -299,7 +299,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/orders-update", "http://localhost:8000/orders-update",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at orders update title and header #Look at orders update title and header
...@@ -316,7 +316,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -316,7 +316,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/orders-list", "http://localhost:8000/orders-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find and click button to orders create #Find and click button to orders create
...@@ -325,7 +325,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -325,7 +325,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/orders-create", "http://localhost:8000/orders-create",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Look at orders update title and header #Look at orders update title and header
...@@ -342,7 +342,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -342,7 +342,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000/orders-list", "http://localhost:8000/orders-list",
self.browser.getCurrentUrl() self.browser.current_url
) )
#Find and click back button to home page #Find and click back button to home page
...@@ -351,7 +351,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -351,7 +351,7 @@ class NewVisitorTest(unittest.TestCase):
time.sleep(1) time.sleep(1)
self.assertEqual( self.assertEqual(
"http://localhost:8000", "http://localhost:8000",
self.browser.getCurrentUrl() self.browser.current_url
) )
self.fail("Finish the test") self.fail("Finish the test")
......
<!DOCTYPE html>
<html>
<head>
<title>The Good Place FroYo Shop</title>
</head>
<body>
<div>
<h1 id="page_header">The Good Place FroYo Shop</h1>
</div>
<div>
<h2 id="home_page_ingredients">Ingredients</h2>
<form>
<button type="button" id="button_to_ingredients">View available ingredients</button>
</form>
</div>
<div>
<h2 id="home_page_recipes">Recipes</h2>
<form>
<button type="button" id="button_to_recipes">Go to recipes</button>
</form>
</div>
<div>
<h2 id="home_page_orders">Orders</h2>
<form>
<button type="button" id="button_to_orders">Check current orders</button>
</form>
</div>
</body>
</html>
...@@ -55,7 +55,7 @@ ROOT_URLCONF = 'thegoodplace.urls' ...@@ -55,7 +55,7 @@ ROOT_URLCONF = 'thegoodplace.urls'
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [], 'DIRS': ["templates"],
'APP_DIRS': True, 'APP_DIRS': True,
'OPTIONS': { 'OPTIONS': {
'context_processors': [ 'context_processors': [
......
...@@ -14,8 +14,9 @@ Including another URLconf ...@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import path, include
urlpatterns = [ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('', include('froyo.urls')),
] ]
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