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
aa6b1f86
Commit
aa6b1f86
authored
Mar 13, 2020
by
Anton Ralph F. Valenzuela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored for FT.
parent
04751904
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
18 deletions
+20
-18
urls.py
froyo/urls.py
+16
-14
functional_tests.py
functional_tests.py
+3
-3
urls.py
thegoodplace/urls.py
+1
-1
No files found.
froyo/urls.py
View file @
aa6b1f86
from
django.conf.urls
import
url
from
.views
import
HomeView
from
.views
import
(
HomeView
,
OrdersListView
,
OrdersDetailView
,
OrdersUpdateView
,
OrdersCreateView
,
RecipesListView
,
RecipesDetailView
,
RecipesUpdateView
,
RecipesCreateView
,
IngredientsListView
,
IngredientsDetailView
,
IngredientsUpdateView
,
IngredientsCreateView
)
urlpatterns
=
[
url
(
r'^$'
,
HomeView
_
.
asV
iew
(),
name
=
'home'
),
url
(
r'^orders$'
,
OrdersListView
.
as
V
iew
(),
name
=
'orders-list'
),
url
(
r'^orders/detail$'
,
OrdersDetail
sView
.
asV
iew
(),
name
=
'orders-detail'
),
url
(
r'^orders/update_form$'
,
OrdersUpdateView
.
as
V
iew
(),
name
=
'orders-update-form'
),
url
(
r'^orders/create_form$'
,
OrdersCreateView
.
as
V
iew
(),
name
=
'orders-create-form'
),
url
(
r'^recipes$'
,
RecipesListView
.
as
V
iew
(),
name
=
'recipes-list'
),
url
(
r'^recipes/detail$'
,
RecipesDetail
sView
.
asV
iew
(),
name
=
'recipes-detail'
),
url
(
r'^recipes/update_form$'
,
RecipesUpdateView
.
as
V
iew
(),
name
=
'recipes-update-form'
),
url
(
r'^recipes/create_form$'
,
RecipesCreateView
.
as
V
iew
(),
name
=
'recipes-create-form'
),
url
(
r'^ingredients$'
,
IngredientsListView
.
as
V
iew
(),
name
=
'ingredients-list'
),
url
(
r'^ingredients/detail$'
,
IngredientsDetail
sView
.
asV
iew
(),
name
=
'ingredients-detail'
),
url
(
r'^ingredients/update_form$'
,
IngredientsUpdateView
.
as
V
iew
(),
name
=
'ingredients-update-form'
),
url
(
r'^ingredients/create_form$'
,
IngredientsCreateView
.
as
V
iew
(),
name
=
'ingredients-create-form'
),
url
(
r'^$'
,
HomeView
.
as_v
iew
(),
name
=
'home'
),
url
(
r'^orders$'
,
OrdersListView
.
as
_v
iew
(),
name
=
'orders-list'
),
url
(
r'^orders/detail$'
,
OrdersDetail
View
.
as_v
iew
(),
name
=
'orders-detail'
),
url
(
r'^orders/update_form$'
,
OrdersUpdateView
.
as
_v
iew
(),
name
=
'orders-update-form'
),
url
(
r'^orders/create_form$'
,
OrdersCreateView
.
as
_v
iew
(),
name
=
'orders-create-form'
),
url
(
r'^recipes$'
,
RecipesListView
.
as
_v
iew
(),
name
=
'recipes-list'
),
url
(
r'^recipes/detail$'
,
RecipesDetail
View
.
as_v
iew
(),
name
=
'recipes-detail'
),
url
(
r'^recipes/update_form$'
,
RecipesUpdateView
.
as
_v
iew
(),
name
=
'recipes-update-form'
),
url
(
r'^recipes/create_form$'
,
RecipesCreateView
.
as
_v
iew
(),
name
=
'recipes-create-form'
),
url
(
r'^ingredients$'
,
IngredientsListView
.
as
_v
iew
(),
name
=
'ingredients-list'
),
url
(
r'^ingredients/detail$'
,
IngredientsDetail
View
.
as_v
iew
(),
name
=
'ingredients-detail'
),
url
(
r'^ingredients/update_form$'
,
IngredientsUpdateView
.
as
_v
iew
(),
name
=
'ingredients-update-form'
),
url
(
r'^ingredients/create_form$'
,
IngredientsCreateView
.
as
_v
iew
(),
name
=
'ingredients-create-form'
),
]
functional_tests.py
View file @
aa6b1f86
...
...
@@ -53,13 +53,13 @@ class NewVisitorTest(unittest.TestCase):
#One of the employees, a deliveryman, arrive with a package of dry ice. Wishing to keep track of the change,
#They add it to the list.
self
.
browser
.
get
(
'http://localhost:8000/ingredients'
)
self
.
assertIn
(
'
i
ngredients - List'
,
self
.
browser
.
title
)
self
.
assertIn
(
'
I
ngredients - List'
,
self
.
browser
.
title
)
#After some looking, they find a button that would allow them to add their ingredients.
self
.
browser
.
get
(
'http://localhost:8000/ingredients/create_form'
)
self
.
assertIn
(
'
i
ngredients - Create'
,
self
.
browser
.
title
)
self
.
assertIn
(
'
I
ngredients - Create'
,
self
.
browser
.
title
)
self
.
browser
.
get
(
'http://localhost:8000/ingredients/update_form'
)
self
.
assertIn
(
'
i
ngredients - Update'
,
self
.
browser
.
title
)
self
.
assertIn
(
'
I
ngredients - Update'
,
self
.
browser
.
title
)
def
test_can_display_ingredient_details
(
self
):
#The employee wanted to know how much dry ice they currently have, so they click on the entry.
...
...
thegoodplace/urls.py
View file @
aa6b1f86
...
...
@@ -13,7 +13,7 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from
django.conf.urls
import
url
from
django.conf.urls
import
include
,
url
from
django.contrib
import
admin
urlpatterns
=
[
...
...
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