Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CSCI 40 Project 1
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
Dirk Reyes
CSCI 40 Project 1
Commits
3da16ca3
Commit
3da16ca3
authored
Mar 25, 2020
by
Dirk Reyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a few syntax errors
parent
2d8084f2
Pipeline
#1149
canceled with stages
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
50 deletions
+51
-50
tests.py
froyo/tests.py
+24
-24
urls.py
froyo/urls.py
+13
-13
views.py
froyo/views.py
+12
-12
__init__.cpython-37.pyc
thegoodplace/__pycache__/__init__.cpython-37.pyc
+0
-0
settings.cpython-37.pyc
thegoodplace/__pycache__/settings.cpython-37.pyc
+0
-0
urls.cpython-37.pyc
thegoodplace/__pycache__/urls.cpython-37.pyc
+0
-0
urls.py
thegoodplace/urls.py
+2
-1
No files found.
froyo/tests.py
View file @
3da16ca3
...
@@ -2,60 +2,60 @@ from django.test import TestCase
...
@@ -2,60 +2,60 @@ from django.test import TestCase
class
CheckIngredientsList
(
TestCase
):
class
CheckIngredientsList
(
TestCase
):
def
check_if_ingredients_list_views
(
self
):
def
check_if_ingredients_list_views
(
self
):
response
=
self
.
client
.
get
(
'ingredients/list/'
)
response
=
self
.
client
.
get
(
'ingredients/list/'
)
self
.
assertTemplateUsed
(
response
,
"ingredients_list.html"
)
self
.
assertTemplateUsed
(
response
,
"ingredients_list.html"
)
class
CheckIngredientsDetail
(
TestCase
):
class
CheckIngredientsDetail
(
TestCase
):
def
check_if_ingredients_detail_views
(
self
):
def
check_if_ingredients_detail_views
(
self
):
response
=
self
.
client
.
get
(
'ingredients/detail/'
)
response
=
self
.
client
.
get
(
'ingredients/detail/'
)
self
.
assertTemplateUsed
(
response
,
"ingredients_detail.html"
)
self
.
assertTemplateUsed
(
response
,
"ingredients_detail.html"
)
class
CheckIngredientsUpdateForm
(
TestCase
):
class
CheckIngredientsUpdateForm
(
TestCase
):
def
check_if_ingredients_update_form_views
(
self
):
def
check_if_ingredients_update_form_views
(
self
):
response
=
self
.
client
.
get
(
'ingredients/update_form/'
)
response
=
self
.
client
.
get
(
'ingredients/update_form/'
)
self
.
assertTemplateUsed
(
response
,
"ingredients_update_form.html"
)
self
.
assertTemplateUsed
(
response
,
"ingredients_update_form.html"
)
class
CheckIngredientsCreateForm
(
TestCase
):
class
CheckIngredientsCreateForm
(
TestCase
):
def
check_if_ingredients_create_form_views
(
self
):
def
check_if_ingredients_create_form_views
(
self
):
response
=
self
.
client
.
get
(
'ingredients/create_form/'
)
response
=
self
.
client
.
get
(
'ingredients/create_form/'
)
self
.
assertTemplateUsed
(
response
,
"ingredients_create_form.html"
)
self
.
assertTemplateUsed
(
response
,
"ingredients_create_form.html"
)
class
CheckRecipesList
(
TestCase
):
class
CheckRecipesList
(
TestCase
):
def
check_if_recipes_list_views
(
self
):
def
check_if_recipes_list_views
(
self
):
response
=
self
.
client
.
get
(
'recipes/list/'
)
response
=
self
.
client
.
get
(
'recipes/list/'
)
self
.
assertTemplateUsed
(
response
,
"recipes_list.html"
)
self
.
assertTemplateUsed
(
response
,
"recipes_list.html"
)
class
CheckRecipesDetail
(
TestCase
):
class
CheckRecipesDetail
(
TestCase
):
def
check_if_recipes_detail_views
(
self
):
def
check_if_recipes_detail_views
(
self
):
response
=
self
.
client
.
get
(
'recipes/detail/'
)
response
=
self
.
client
.
get
(
'recipes/detail/'
)
self
.
assertTemplateUsed
(
response
,
"recipes_detail.html"
)
self
.
assertTemplateUsed
(
response
,
"recipes_detail.html"
)
class
CheckRecipesUpdateForm
(
TestCase
):
class
CheckRecipesUpdateForm
(
TestCase
):
def
check_if_recipes_update_form_views
(
self
):
def
check_if_recipes_update_form_views
(
self
):
response
=
self
.
client
.
get
(
'recipes/update_form/'
)
response
=
self
.
client
.
get
(
'recipes/update_form/'
)
self
.
assertTemplateUsed
(
response
,
"recipes_update_form.html"
)
self
.
assertTemplateUsed
(
response
,
"recipes_update_form.html"
)
class
CheckRecipesCreateForm
(
TestCase
):
class
CheckRecipesCreateForm
(
TestCase
):
def
check_if_recipes_create_form_views
(
self
):
def
check_if_recipes_create_form_views
(
self
):
response
=
self
.
client
.
get
(
'recipes/create_form/'
)
response
=
self
.
client
.
get
(
'recipes/create_form/'
)
self
.
assertTemplateUsed
(
response
,
"recipes_create_form.html"
)
self
.
assertTemplateUsed
(
response
,
"recipes_create_form.html"
)
class
CheckOrdersList
(
TestCase
):
class
CheckOrdersList
(
TestCase
):
def
check_if_orders_list_views
(
self
):
def
check_if_orders_list_views
(
self
):
response
=
self
.
client
.
get
(
'orders/list/'
)
response
=
self
.
client
.
get
(
'orders/list/'
)
self
.
assertTemplateUsed
(
response
,
"orders_list.html"
)
self
.
assertTemplateUsed
(
response
,
"orders_list.html"
)
class
CheckOrdersDetail
(
TestCase
):
class
CheckOrdersDetail
(
TestCase
):
def
check_if_orders_detail_views
(
self
):
def
check_if_orders_detail_views
(
self
):
response
=
self
.
client
.
get
(
'orders/detail/'
)
response
=
self
.
client
.
get
(
'orders/detail/'
)
self
.
assertTemplateUsed
(
response
,
"orders_detail.html"
)
self
.
assertTemplateUsed
(
response
,
"orders_detail.html"
)
class
CheckOrdersUpdateForm
(
TestCase
):
class
CheckOrdersUpdateForm
(
TestCase
):
def
check_if_orders_update_form_views
(
self
):
def
check_if_orders_update_form_views
(
self
):
response
=
self
.
client
.
get
(
'orders/update_form/'
)
response
=
self
.
client
.
get
(
'orders/update_form/'
)
self
.
assertTemplateUsed
(
response
,
"orders_update_form.html"
)
self
.
assertTemplateUsed
(
response
,
"orders_update_form.html"
)
class
CheckOrdersCreateForm
(
TestCase
):
class
CheckOrdersCreateForm
(
TestCase
):
def
check_if_orders_create_form_views
(
self
):
def
check_if_orders_create_form_views
(
self
):
response
=
self
.
client
.
get
(
'orders/create_form/'
)
response
=
self
.
client
.
get
(
'orders/create_form/'
)
self
.
assertTemplateUsed
(
response
,
"orders_create_form.html"
)
self
.
assertTemplateUsed
(
response
,
"orders_create_form.html"
)
froyo/urls.py
View file @
3da16ca3
from
django.conf
s.url
import
url
from
django.conf
.urls
import
url
from
.views
import
IngredientsList
,
IngredientsDetail
,
IngredientsUpdateForm
,
IngredientsCreateForm
,
RecipesList
,
RecipesDetail
,
RecipesUpdateForm
,
RecipesCreateForm
,
OrdersList
,
OrdersDetail
,
OrdersUpdateForm
,
OrdersCreateForm
from
.views
import
IngredientsList
,
IngredientsDetail
,
IngredientsUpdateForm
,
IngredientsCreateForm
,
RecipesList
,
RecipesDetail
,
RecipesUpdateForm
,
RecipesCreateForm
,
OrdersList
,
OrdersDetail
,
OrdersUpdateForm
,
OrdersCreateForm
urlpatterns
=
[
urlpatterns
=
[
url
(
r'^ingredients/list/$'
,
IngredientsList
.
as_view
(),
name
"ingredients_list"
),
url
(
r'^ingredients/list/$'
,
IngredientsList
.
as_view
(),
name
=
'ingredients_list'
),
url
(
r'^ingredients/detail/$'
,
IngredientsDetail
.
as_view
(),
name
"ingredients_detail"
),
url
(
r'^ingredients/detail/$'
,
IngredientsDetail
.
as_view
(),
name
=
'ingredients_detail'
),
url
(
r'^ingredients/update_form/$'
,
IngredientsUpdateForm
.
as_view
(),
name
"ingredients_update_form"
),
url
(
r'^ingredients/update_form/$'
,
IngredientsUpdateForm
.
as_view
(),
name
=
'ingredients_update_form'
),
url
(
r'^ingredients/create_form/$'
,
IngredientsCreateForm
.
as_view
(),
name
"ingredients_create_form"
),
url
(
r'^ingredients/create_form/$'
,
IngredientsCreateForm
.
as_view
(),
name
=
'ingredients_create_form'
),
url
(
r'^recipes/list/$'
,
RecipesList
.
as_view
(),
name
"recipes_list"
),
url
(
r'^recipes/list/$'
,
RecipesList
.
as_view
(),
name
=
'recipes_list'
),
url
(
r'^recipes/detail/$'
,
RecipesDetail
.
as_view
(),
name
"recipes_detail"
),
url
(
r'^recipes/detail/$'
,
RecipesDetail
.
as_view
(),
name
=
'recipes_detail'
),
url
(
r'^recipes/update_form/$'
,
RecipesUpdateForm
.
as_view
(),
name
"recipes_update_form"
),
url
(
r'^recipes/update_form/$'
,
RecipesUpdateForm
.
as_view
(),
name
=
'recipes_update_form'
),
url
(
r'^recipes/create_form/$'
,
RecipesCreateForm
.
as_view
(),
name
"recipes_create_form"
),
url
(
r'^recipes/create_form/$'
,
RecipesCreateForm
.
as_view
(),
name
=
'recipes_create_form'
),
url
(
r'^orders/list/$'
,
OrdersList
.
as_view
(),
name
"orders_list"
),
url
(
r'^orders/list/$'
,
OrdersList
.
as_view
(),
name
=
'orders_list'
),
url
(
r'^orders/detail/$'
,
OrdersDetail
.
as_view
(),
name
"orders_detail"
),
url
(
r'^orders/detail/$'
,
OrdersDetail
.
as_view
(),
name
=
'orders_detail'
),
url
(
r'^orders/update_form/$'
,
OrdersUpdateForm
.
as_view
(),
name
"orders_update_form"
),
url
(
r'^orders/update_form/$'
,
OrdersUpdateForm
.
as_view
(),
name
=
'orders_update_form'
),
url
(
r'^orders/create_form/$'
,
OrdersCreateForm
.
as_view
(),
name
"orders_create_form"
),
url
(
r'^orders/create_form/$'
,
OrdersCreateForm
.
as_view
(),
name
=
'orders_create_form'
)
]
]
\ No newline at end of file
froyo/views.py
View file @
3da16ca3
...
@@ -2,37 +2,37 @@ from django.views.generic.base import TemplateView
...
@@ -2,37 +2,37 @@ from django.views.generic.base import TemplateView
class
IngredientsList
(
TemplateView
):
class
IngredientsList
(
TemplateView
):
template_name
=
"ingredients_list.html"
template_name
=
'ingredients_list.html'
class
IngredientsDetail
(
TemplateView
):
class
IngredientsDetail
(
TemplateView
):
template_name
=
"ingredients_detail.html"
template_name
=
'ingredients_detail.html'
class
IngredientsUpdateForm
(
TemplateView
):
class
IngredientsUpdateForm
(
TemplateView
):
template_name
=
"ingredients_update_form.html"
template_name
=
'ingredients_update_form.html'
class
IngredientsCreateForm
(
TemplateView
):
class
IngredientsCreateForm
(
TemplateView
):
template_name
=
"ingredients_create_form.html"
template_name
=
'ingredients_create_form.html'
class
RecipesList
(
TemplateView
):
class
RecipesList
(
TemplateView
):
template_name
=
"recipes_list.html"
template_name
=
'recipes_list.html'
class
RecipesDetail
(
TemplateView
):
class
RecipesDetail
(
TemplateView
):
template_name
=
"recipes_detail.html"
template_name
=
'recipes_detail.html'
class
RecipesUpdateForm
(
TemplateView
):
class
RecipesUpdateForm
(
TemplateView
):
template_name
=
"recipes_update_form.html"
template_name
=
'recipes_update_form.html'
class
RecipesCreateForm
(
TemplateView
):
class
RecipesCreateForm
(
TemplateView
):
template_name
=
"recipes_create_form.html"
template_name
=
'recipes_create_form.html'
class
OrdersList
(
TemplateView
):
class
OrdersList
(
TemplateView
):
template_name
=
"orders_list.html"
template_name
=
'orders_list.html'
class
OrdersDetail
(
TemplateView
):
class
OrdersDetail
(
TemplateView
):
template_name
=
"orders_detail.html"
template_name
=
'orders_detail.html'
class
OrdersUpdateForm
(
TemplateView
):
class
OrdersUpdateForm
(
TemplateView
):
template_name
=
"orders_update_form.html"
template_name
=
'orders_update_form.html'
class
OrdersCreateForm
(
TemplateView
):
class
OrdersCreateForm
(
TemplateView
):
template_name
=
"orders_create_form.html"
template_name
=
'orders_create_form.html'
thegoodplace/__pycache__/__init__.cpython-37.pyc
View file @
3da16ca3
No preview for this file type
thegoodplace/__pycache__/settings.cpython-37.pyc
View file @
3da16ca3
No preview for this file type
thegoodplace/__pycache__/urls.cpython-37.pyc
View file @
3da16ca3
No preview for this file type
thegoodplace/urls.py
View file @
3da16ca3
...
@@ -18,5 +18,6 @@ from django.contrib import admin
...
@@ -18,5 +18,6 @@ from django.contrib import admin
urlpatterns
=
[
urlpatterns
=
[
url
(
r''
,
include
(
'appname.urls'
))
url
(
r'^admin/'
,
admin
.
site
.
urls
),
url
(
r''
,
include
(
'froyo.urls'
))
]
]
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