Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
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
Patrick James Ong
thegoodplace
Commits
342e111a
Commit
342e111a
authored
Mar 17, 2020
by
Patrick James Ong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added List, Detail, Create, and Update Page Tests for ingredients, recipes, and orders
parent
400d9b41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
28 deletions
+24
-28
views.py
thegoodplace/froyo/views.py
+24
-28
No files found.
thegoodplace/froyo/views.py
View file @
342e111a
from
django.views.generic.base
import
TemplateView
from
django.views.generic.base
import
TemplateView
from
django.views.generic.list
import
ListView
from
django.views.generic.detail
import
DetailView
from
django.views.generic.edit
import
CreateView
from
django.views.generic.edit
import
UpdateView
# INGREDIENTS
# INGREDIENTS
class
IngredientListView
(
List
View
):
class
IngredientListView
(
Template
View
):
model
=
None
template_name
=
'ingredients_list.html'
class
IngredientDetailView
(
Detail
View
):
class
IngredientDetailView
(
Template
View
):
model
=
None
template_name
=
'ingredients_detail.html'
class
IngredientUpdateView
(
Upd
ateView
):
class
IngredientUpdateView
(
Templ
ateView
):
template_name
_suffix
=
'
_update_form.html'
template_name
=
'ingredients
_update_form.html'
class
IngredientCreateView
(
Cre
ateView
):
class
IngredientCreateView
(
Templ
ateView
):
template_name
_suffix
=
'
_create_form.html'
template_name
=
'ingredients
_create_form.html'
# RECIPES
# RECIPES
class
RecipesListView
(
List
View
):
class
RecipesListView
(
Template
View
):
model
=
None
template_name
=
'recipes_list.html'
class
RecipesDetailView
(
Detail
View
):
class
RecipesDetailView
(
Template
View
):
model
=
None
template_name
=
'recipes_detail.html'
class
RecipesUpdateView
(
Upd
ateView
):
class
RecipesUpdateView
(
Templ
ateView
):
template_name
_suffix
=
'
_update_form.html'
template_name
=
'recipes
_update_form.html'
class
RecipesCreateView
(
Cre
ateView
):
class
RecipesCreateView
(
Templ
ateView
):
template_name
_suffix
=
'
_create_form.html'
template_name
=
'recipes
_create_form.html'
# ORDERS
# ORDERS
class
OrdersListView
(
List
View
):
class
OrdersListView
(
Template
View
):
model
=
None
template_name
=
'orders_list.html'
class
OrdersDetailView
(
Detail
View
):
class
OrdersDetailView
(
Template
View
):
model
=
None
template_name
=
'orders_detail.html'
class
OrdersUpdateView
(
Upd
ateView
):
class
OrdersUpdateView
(
Templ
ateView
):
template_name
_suffix
=
'
_update_form.html'
template_name
=
'orders
_update_form.html'
class
OrdersCreateView
(
Cre
ateView
):
class
OrdersCreateView
(
Templ
ateView
):
template_name
_suffix
=
'
_create_form.html'
template_name
=
'orders
_create_form.html'
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