Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
csci40_midterms
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
John Carlos Sanil
csci40_midterms
Commits
9d853090
Commit
9d853090
authored
Mar 21, 2020
by
Carlowsss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit Tested and Created Orders Views
parent
36dad994
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
5 deletions
+73
-5
orders_create_form.html
froyo/templates/orders_create_form.html
+8
-0
orders_detail.html
froyo/templates/orders_detail.html
+8
-0
orders_list.html
froyo/templates/orders_list.html
+8
-0
orders_update_form.html
froyo/templates/orders_update_form.html
+8
-0
tests.py
froyo/tests.py
+21
-1
urls.py
froyo/urls.py
+6
-3
views.py
froyo/views.py
+14
-1
No files found.
froyo/templates/orders_create_form.html
0 → 100644
View file @
9d853090
<html>
<head>
<title>
Orders - Create
</title>
</head>
<body>
<h1>
Orders - Create
</h1>
</body>
</html>
froyo/templates/orders_detail.html
0 → 100644
View file @
9d853090
<html>
<head>
<title>
Orders - Detail
</title>
</head>
<body>
<h1>
Orders - Detail
</h1>
</body>
</html>
froyo/templates/orders_list.html
0 → 100644
View file @
9d853090
<html>
<head>
<title>
Orders - List
</title>
</head>
<body>
<h1>
Orders - List
</h1>
</body>
</html>
froyo/templates/orders_update_form.html
0 → 100644
View file @
9d853090
<html>
<head>
<title>
Orders - Update
</title>
</head>
<body>
<h1>
Orders - Update
</h1>
</body>
</html>
froyo/tests.py
View file @
9d853090
...
...
@@ -45,3 +45,23 @@ class RecipesPageTests(TestCase):
def
test_recipes_create_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/recipes_create_form'
)
self
.
assertTemplateUsed
(
response
,
'recipes_create_form.html'
)
class
OrdersPageTests
(
TestCase
):
def
test_orders_list_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/orders_list'
)
self
.
assertTemplateUsed
(
response
,
'orders_list.html'
)
def
test_orders_detail_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/orders_detail'
)
self
.
assertTemplateUsed
(
response
,
'orders_detail.html'
)
def
test_orders_update_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/orders_update_form'
)
self
.
assertTemplateUsed
(
response
,
'orders_update_form.html'
)
def
test_orders_create_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/orders_create_form'
)
self
.
assertTemplateUsed
(
response
,
'orders_create_form.html'
)
\ No newline at end of file
froyo/urls.py
View file @
9d853090
...
...
@@ -3,7 +3,7 @@ from django.conf.urls import url
from
.views
import
HomePageView
from
.views
import
IngredientsListView
,
IngredientsDetailView
,
IngredientsUpdateView
,
IngredientsCreateView
from
.views
import
RecipesListView
,
RecipesDetailView
,
RecipesUpdateView
,
RecipesCreateView
from
.views
import
OrdersListView
,
OrdersDetailView
,
OrdersUpdateView
,
OrdersCreateView
urlpatterns
=
[
url
(
r'^$'
,
HomePageView
.
as_view
(),
name
=
'home'
),
...
...
@@ -14,6 +14,9 @@ urlpatterns = [
url
(
r'^recipes_list$'
,
RecipesListView
.
as_view
(),
name
=
'recipes_list'
),
url
(
r'^recipes_detail$'
,
RecipesDetailView
.
as_view
(),
name
=
'recipes_detail'
),
url
(
r'^recipes_update_form$'
,
RecipesUpdateView
.
as_view
(),
name
=
'recipes_update_form'
),
url
(
r'^recipes_create_form$'
,
RecipesCreateView
.
as_view
(),
name
=
'recipes_create_form'
)
url
(
r'^recipes_create_form$'
,
RecipesCreateView
.
as_view
(),
name
=
'recipes_create_form'
),
url
(
r'^orders_list$'
,
OrdersListView
.
as_view
(),
name
=
'orders_list'
),
url
(
r'^orders_detail$'
,
OrdersDetailView
.
as_view
(),
name
=
'orders_detail'
),
url
(
r'^orders_update_form$'
,
OrdersUpdateView
.
as_view
(),
name
=
'orders_update_form'
),
url
(
r'^orders_create_form$'
,
OrdersCreateView
.
as_view
(),
name
=
'orders_create_form'
)
]
\ No newline at end of file
froyo/views.py
View file @
9d853090
...
...
@@ -32,3 +32,16 @@ class RecipesUpdateView(TemplateView):
class
RecipesCreateView
(
TemplateView
):
template_name
=
"recipes_create_form.html"
class
OrdersListView
(
TemplateView
):
template_name
=
"orders_list.html"
class
OrdersDetailView
(
TemplateView
):
template_name
=
"orders_detail.html"
class
OrdersUpdateView
(
TemplateView
):
template_name
=
"orders_update_form.html"
class
OrdersCreateView
(
TemplateView
):
template_name
=
"orders_create_form.html"
\ No newline at end of file
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