Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Project1-Valenzuela-185143
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
Anton Ralph Valenzuela
Project1-Valenzuela-185143
Commits
c02a9d2c
Commit
c02a9d2c
authored
Mar 13, 2020
by
Anton Ralph F. Valenzuela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added views.
parent
f9222deb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
2 deletions
+65
-2
home.html
froyo/templates/home.html
+6
-0
views.py
froyo/views.py
+52
-2
functional_tests.py
functional_tests.py
+7
-0
No files found.
froyo/templates/home.html
0 → 100644
View file @
c02a9d2c
<!DOCTYPE html>
<html>
<head>
<title>
The Good Place FroYo Shop
</title>
</head>
</html>
froyo/views.py
View file @
c02a9d2c
from
django.
shortcuts
import
render
from
django.
views.generic.base
import
TemplateView
# Create your views here.
class
HomeView
(
TemplateView
):
template_name
=
"home.html"
class
OrdersListView
(
TemplateView
):
template_name
=
"orders_list.html"
class
OrdersDetailView
(
TemplateView
):
template_name
=
"orders_detail.html"
class
OrdersUpdateView
(
TemplateView
):
template_name
=
"orders_update.html"
class
OrdersCreateView
(
TemplateView
):
template_name
=
"orders_create.html"
class
RecipesListView
(
TemplateView
):
template_name
=
"recipes_list.html"
class
RecipesDetailView
(
TemplateView
):
template_name
=
"recipes_detail.html"
class
RecipesUpdateView
(
TemplateView
):
template_name
=
"recipes_update.html"
class
RecipesCreateView
(
TemplateView
):
template_name
=
"recipes_create.html"
class
IngredientsListView
(
TemplateView
):
template_name
=
"ingredients_list.html"
class
IngredientsDetailView
(
TemplateView
):
template_name
=
"ingredients_detail.html"
class
IngredientsUpdateView
(
TemplateView
):
template_name
=
"ingredients_update.html"
class
IngredientsCreateView
(
TemplateView
):
template_name
=
"ingredients_create.html"
functional_tests.py
View file @
c02a9d2c
...
...
@@ -10,6 +10,13 @@ class NewVisitorTest(unittest.TestCase):
def
tearDown
(
self
):
self
.
browser
.
quit
()
def
test_can_go_to_home
(
self
):
#Wishing to have a look at all the available options, our employee goes to the home page.
self
.
browser
.
get
(
'http://localhost:8000/'
)
#Hoping he isn't wrong, he looks at the page title to double check.
self
.
assertIn
(
'The Good Place FroYo Shop'
,
self
.
browser
.
title
)
def
test_can_add_orders
(
self
):
#A customer orders a certain froyo. An employee processes the order, verifying that they are on the correct page.
self
.
browser
.
get
(
'http://localhost:8000/orders/list'
)
...
...
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