Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CSCI 40 Midterm Project
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
Lance Michael O. Co
CSCI 40 Midterm Project
Commits
862659c0
Commit
862659c0
authored
Mar 17, 2020
by
Lance Michael O. Co
😢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactored html files, urls.py, and functional test
parent
60547524
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
120 additions
and
9 deletions
+120
-9
home.html
froyo/templates/home.html
+21
-1
ingredients.html
froyo/templates/ingredients.html
+30
-0
orders.html
froyo/templates/orders.html
+30
-0
recipes.html
froyo/templates/recipes.html
+30
-0
urls.py
froyo/urls.py
+6
-6
functional_test.py
functional_test.py
+3
-2
No files found.
froyo/templates/home.html
View file @
862659c0
<html>
<title>
Home
</title>
<head>
<title>
The Good Place FroYo Shop
</title>
</head>
<h1>
The Good Place FroYo Shop
</h1>
<ul>
<li>
<a
href=
"http://localhost:8000/orders"
id=
"orders"
>
Orders
</a>
</li>
<li>
<a
href=
"http://localhost:8000/recipes"
id=
"recipes"
>
Recipes
</a>
</li>
<li>
<a
href=
"http://localhost:8000/ingredients"
id=
"ingredients"
>
Ingredients
</a>
</li>
</ul>
</html>
\ No newline at end of file
froyo/templates/ingredients.html
View file @
862659c0
<html>
<head>
<title>
Ingredients
</title>
</head>
<body>
<h1>
Ingredients
</h1>
<ul>
<li>
<a
href=
"http://localhost:8000/ingredients/create"
id=
"ingredients-create-form"
>
Create an Ingredient
</a>
</li>
<li>
<a
href=
"http://localhost:8000/ingredients/detail"
id=
"ingredients-detail"
>
Check the Details of an Ingredient
</a>
</li>
<li>
<a
href=
"http://localhost:8000/ingredients/list"
id=
"ingredients-list"
>
List the Ingredients
</a>
</li>
<li>
<a
href=
"http://localhost:8000/ingredients/update"
id=
"ingredients-update-form"
>
Update the Ingredients
</a>
</li>
</ul>
<a
href=
"http://localhost:8000/"
id=
"back_to_home_page"
>
Return to Home Page
</a>
</body>
</html>
\ No newline at end of file
froyo/templates/orders.html
View file @
862659c0
<html>
<head>
<title>
Orders
</title>
</head>
<body>
<h1>
Orders
</h1>
<ul>
<li>
<a
href=
"http://localhost:8000/orders/create"
id=
"orders-create-form"
>
Create an Order
</a>
</li>
<li>
<a
href=
"http://localhost:8000/orders/detail"
id=
"orders-detail"
>
Check the Details of an Order
</a>
</li>
<li>
<a
href=
"http://localhost:8000/orders/list"
id=
"orders-list"
>
List the Orders
</a>
</li>
<li>
<a
href=
"http://localhost:8000/orders/update"
id=
"orders-update-form"
>
Update the Orders
</a>
</li>
</ul>
<a
href=
"http://localhost:8000/"
id=
"back_to_home_page"
>
Return to Home Page
</a>
</body>
</html>
\ No newline at end of file
froyo/templates/recipes.html
View file @
862659c0
<html>
<head>
<title>
Recipes
</title>
</head>
<body>
<h1>
Recipes
</h1>
<ul>
<li>
<a
href=
"http://localhost:8000/recipes/create"
id=
"recipes-create-form"
>
Create an Recipe
</a>
</li>
<li>
<a
href=
"http://localhost:8000/recipes/detail"
id=
"recipes-detail"
>
Check the Details of an Recipe
</a>
</li>
<li>
<a
href=
"http://localhost:8000/recipes/list"
id=
"recipes-list"
>
List the Recipes
</a>
</li>
<li>
<a
href=
"http://localhost:8000/recipes/update"
id=
"recipes-update-form"
>
Update the Recipes
</a>
</li>
</ul>
<a
href=
"http://localhost:8000/"
id=
"back_to_home_page"
>
Return to Home Page
</a>
</body>
</html>
\ No newline at end of file
froyo/urls.py
View file @
862659c0
...
...
@@ -17,18 +17,18 @@ urlpatterns = [
#ingredients urls
url
(
r'^ingredients/list$'
,
IngredientsList
.
as_view
(),
name
=
'ingredients-list'
),
url
(
r'^ingredients/detail$'
,
IngredientsDetail
.
as_view
(),
name
=
'ingredients-detail'
),
url
(
r'^ingredients/update$'
,
IngredientsUpdate
.
as_view
(),
name
=
'ingredients-update'
),
url
(
r'^ingredients/create$'
,
IngredientsCreate
.
as_view
(),
name
=
'ingredients-create'
),
url
(
r'^ingredients/update$'
,
IngredientsUpdate
.
as_view
(),
name
=
'ingredients-update
-form
'
),
url
(
r'^ingredients/create$'
,
IngredientsCreate
.
as_view
(),
name
=
'ingredients-create
-form
'
),
#recipes urls
url
(
r'^recipes/list$'
,
RecipesList
.
as_view
(),
name
=
'recipes-list'
),
url
(
r'^recipes/detail$'
,
RecipesDetail
.
as_view
(),
name
=
'recipes-detail'
),
url
(
r'^recipes/update$'
,
RecipesUpdate
.
as_view
(),
name
=
'recipes-update'
),
url
(
r'^recipes/create$'
,
RecipesCreate
.
as_view
(),
name
=
'recipes-create'
),
url
(
r'^recipes/update$'
,
RecipesUpdate
.
as_view
(),
name
=
'recipes-update
-form
'
),
url
(
r'^recipes/create$'
,
RecipesCreate
.
as_view
(),
name
=
'recipes-create
-form
'
),
#orders urls
url
(
r'^orders/list$'
,
OrdersList
.
as_view
(),
name
=
'orders-list'
),
url
(
r'^orders/detail$'
,
OrdersDetail
.
as_view
(),
name
=
'orders-detail'
),
url
(
r'^orders/update$'
,
OrdersUpdate
.
as_view
(),
name
=
'orders-update'
),
url
(
r'^orders/create$'
,
OrdersCreate
.
as_view
(),
name
=
'orders-create'
),
url
(
r'^orders/update$'
,
OrdersUpdate
.
as_view
(),
name
=
'orders-update
-form
'
),
url
(
r'^orders/create$'
,
OrdersCreate
.
as_view
(),
name
=
'orders-create
-form
'
),
]
\ No newline at end of file
functional_test.py
View file @
862659c0
...
...
@@ -19,10 +19,11 @@ class NewVisitorTest(unittest.TestCase):
#user checks page title to ensure he's at the right page
self
.
assertIn
(
'The Good Place FroYo Shop'
,
self
.
browser
.
title
)
#user sees 3 links (orders, ingredients, recipes)
orders
=
self
.
browser
.
find_element_by_id
(
'orders'
)
#user sees 3 links (ingredients, recipes, orders)
ingredients
=
self
.
browser
.
find_element_by_id
(
'ingredients'
)
recipes
=
self
.
browser
.
find_element_by_id
(
'recipes'
)
orders
=
self
.
browser
.
find_element_by_id
(
'orders'
)
def
test_can_see_and_use_ingredients_page
(
self
):
#user clicks on ingredients page
...
...
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