Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CSCI40_Proj_thegoodplace
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
Ana Gabrielle S. Caligagan
CSCI40_Proj_thegoodplace
Commits
55b05610
Commit
55b05610
authored
Mar 18, 2020
by
Ana Gabrielle S. Caligagan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved templates folder inside froyo, fixed a typo in tests, urls
parent
7f311137
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
126 additions
and
18 deletions
+126
-18
ingredients_create_form.html
froyo/templates/ingredients_create_form.html
+9
-0
ingredients_detail.html
froyo/templates/ingredients_detail.html
+9
-0
ingredients_list.html
froyo/templates/ingredients_list.html
+9
-0
ingredients_update_form.html
froyo/templates/ingredients_update_form.html
+9
-0
orders_create_form.html
froyo/templates/orders_create_form.html
+9
-0
orders_detail.html
froyo/templates/orders_detail.html
+9
-0
orders_list.html
froyo/templates/orders_list.html
+9
-0
orders_update_form.html
froyo/templates/orders_update_form.html
+9
-0
recipes_create_form.html
froyo/templates/recipes_create_form.html
+9
-0
recipes_detail.html
froyo/templates/recipes_detail.html
+9
-0
recipes_list.html
froyo/templates/recipes_list.html
+9
-0
recipes_update_form.html
froyo/templates/recipes_update_form.html
+9
-0
tests.py
froyo/tests.py
+3
-3
urls.py
froyo/urls.py
+12
-12
functional_test.py
functional_test.py
+2
-2
ingredients_create_form.html
templates/ingredients_create_form.html
+0
-0
ingredients_detail.html
templates/ingredients_detail.html
+0
-0
ingredients_list.html
templates/ingredients_list.html
+0
-0
ingredients_update_form.html
templates/ingredients_update_form.html
+0
-0
orders_create_form.html
templates/orders_create_form.html
+0
-0
orders_detail.html
templates/orders_detail.html
+0
-0
orders_list.html
templates/orders_list.html
+0
-0
orders_update_form.html
templates/orders_update_form.html
+0
-0
recipes_create_form.html
templates/recipes_create_form.html
+0
-0
recipes_detail.html
templates/recipes_detail.html
+0
-0
recipes_list.html
templates/recipes_list.html
+0
-0
recipes_update_form.html
templates/recipes_update_form.html
+0
-0
settings.py
thegoodplace/settings.py
+1
-1
No files found.
froyo/templates/ingredients_create_form.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Ingredients - Create
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/ingredients_detail.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Ingredients - Detail
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/ingredients_list.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Ingredients - List
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/ingredients_update_form.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Ingredients - Update
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/orders_create_form.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Orders - Create
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/orders_detail.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Orders - Detail
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/orders_list.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Orders - List
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/orders_update_form.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Orders - Update
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/recipes_create_form.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Recipes - Create
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/recipes_detail.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Recipes - Detail
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/recipes_list.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Recipes - List
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/templates/recipes_update_form.html
0 → 100644
View file @
55b05610
<!DOCTYPE html>
<html>
<head>
<title>
Recipes - Update
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
froyo/tests.py
View file @
55b05610
from
django.test
import
TestCase
from
django.urls
import
resolve
from
django.http
import
HttpRequest
from
.views
import
IngredientsListView
,
IngredientsDetailView
,
IngredientsUpdateView
,
IngredientsCreateView
,
RecipesListView
,
RecipesDetailView
,
RecipesUpdateView
,
RecipesCreateView
,
OrdersListView
,
OrdersDetailView
,
OrdersUpdateView
,
OrdersCreateView
#ingredients model
...
...
@@ -37,11 +37,11 @@ class IngredientsCreateTest(TestCase):
class
RecipesListTest
(
TestCase
):
def
test_recipes_list_page_returns_correct
(
self
):
response
=
self
.
client
.
get
(
'/recipes/
create
'
)
response
=
self
.
client
.
get
(
'/recipes/
list
'
)
self
.
assertTemplateUsed
(
response
,
'recipes_list.html'
)
class
Recipes
s
DetailTest
(
TestCase
):
class
RecipesDetailTest
(
TestCase
):
def
test_recipes_detail_page_returns_correct
(
self
):
response
=
self
.
client
.
get
(
'/recipes/detail'
)
...
...
froyo/urls.py
View file @
55b05610
...
...
@@ -3,18 +3,18 @@ from django.conf.urls import url
from
.views
import
IngredientsListView
,
IngredientsDetailView
,
IngredientsUpdateView
,
IngredientsCreateView
,
RecipesListView
,
RecipesDetailView
,
RecipesUpdateView
,
RecipesCreateView
,
OrdersListView
,
OrdersDetailView
,
OrdersUpdateView
,
OrdersCreateView
urlpatterns
=
[
url
(
r'^ingredients/list
/
$'
,
IngredientsListView
.
as_view
(),
name
=
'ingredients_list'
),
url
(
r'^ingredients/detail
/
$'
,
IngredientsDetailView
.
as_view
(),
name
=
'ingredients_detail'
),
url
(
r'^ingredients/update
/
$'
,
IngredientsUpdateView
.
as_view
(),
name
=
'ingredients_update_form'
),
url
(
r'^ingredients/create
/
$'
,
IngredientsCreateView
.
as_view
(),
name
=
'ingredients_create_form'
),
url
(
r'^ingredients/list$'
,
IngredientsListView
.
as_view
(),
name
=
'ingredients_list'
),
url
(
r'^ingredients/detail$'
,
IngredientsDetailView
.
as_view
(),
name
=
'ingredients_detail'
),
url
(
r'^ingredients/update$'
,
IngredientsUpdateView
.
as_view
(),
name
=
'ingredients_update_form'
),
url
(
r'^ingredients/create$'
,
IngredientsCreateView
.
as_view
(),
name
=
'ingredients_create_form'
),
url
(
r'^recipes/list
/
$'
,
RecipesListView
.
as_view
(),
name
=
'recipes_list'
),
url
(
r'^recipes/detail
/
$'
,
RecipesDetailView
.
as_view
(),
name
=
'recipes_detail'
),
url
(
r'^recipes/update
/
$'
,
RecipesUpdateView
.
as_view
(),
name
=
'recipes_update_form'
),
url
(
r'^recipes/create
/
$'
,
RecipesCreateView
.
as_view
(),
name
=
'recipes_create_form'
),
url
(
r'^recipes/list$'
,
RecipesListView
.
as_view
(),
name
=
'recipes_list'
),
url
(
r'^recipes/detail$'
,
RecipesDetailView
.
as_view
(),
name
=
'recipes_detail'
),
url
(
r'^recipes/update$'
,
RecipesUpdateView
.
as_view
(),
name
=
'recipes_update_form'
),
url
(
r'^recipes/create$'
,
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
/
$'
,
OrdersUpdateView
.
as_view
(),
name
=
'orders_update_form'
),
url
(
r'^orders/create
/
$'
,
OrdersCreateView
.
as_view
(),
name
=
'orders_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$'
,
OrdersUpdateView
.
as_view
(),
name
=
'orders_update_form'
),
url
(
r'^orders/create$'
,
OrdersCreateView
.
as_view
(),
name
=
'orders_create_form'
),
]
\ No newline at end of file
functional_test.py
View file @
55b05610
...
...
@@ -54,7 +54,7 @@ class NewVisitorTest(unittest.TestCase):
self
.
browser
.
get
(
'http://localhost:8000/recipes/update'
)
self
.
assertIn
(
'Recipes - Update'
,
self
.
browser
.
title
)
def
test_can_create_
R
ecipes
(
self
):
def
test_can_create_
r
ecipes
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/recipes/create'
)
self
.
assertIn
(
'Recipes - Create'
,
self
.
browser
.
title
)
...
...
@@ -88,8 +88,8 @@ class NewVisitorTest(unittest.TestCase):
#self.assertIn('', self.browser.find_element_by_id('new_size').text)
#self.assertIn('', self.browser.find_element_by_id('new_base_recipe').text)
#self.assertIn('',self.browser.find_element_by_id('new_customization').text)
self
.
fail
(
'Finish the test!'
)
if
__name__
==
'__main__'
:
...
...
templates/ingredients_create_form.html
deleted
100644 → 0
View file @
7f311137
templates/ingredients_detail.html
deleted
100644 → 0
View file @
7f311137
templates/ingredients_list.html
deleted
100644 → 0
View file @
7f311137
templates/ingredients_update_form.html
deleted
100644 → 0
View file @
7f311137
templates/orders_create_form.html
deleted
100644 → 0
View file @
7f311137
templates/orders_detail.html
deleted
100644 → 0
View file @
7f311137
templates/orders_list.html
deleted
100644 → 0
View file @
7f311137
templates/orders_update_form.html
deleted
100644 → 0
View file @
7f311137
templates/recipes_create_form.html
deleted
100644 → 0
View file @
7f311137
templates/recipes_detail.html
deleted
100644 → 0
View file @
7f311137
templates/recipes_list.html
deleted
100644 → 0
View file @
7f311137
templates/recipes_update_form.html
deleted
100644 → 0
View file @
7f311137
thegoodplace/settings.py
View file @
55b05610
...
...
@@ -55,7 +55,7 @@ ROOT_URLCONF = 'thegoodplace.urls'
TEMPLATES
=
[
{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'DIRS'
:
[
os
.
path
.
join
(
BASE_DIR
,
'templates'
),
os
.
path
.
join
(
BASE_DIR
,
'
froyo
'
,
'templates'
)],
'DIRS'
:
[
os
.
path
.
join
(
BASE_DIR
,
'templates'
),
os
.
path
.
join
(
BASE_DIR
,
''
,
'templates'
)],
'APP_DIRS'
:
True
,
'OPTIONS'
:
{
'context_processors'
:
[
...
...
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