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
7309184f
Commit
7309184f
authored
Mar 17, 2020
by
Patrick James Ong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created views for ingredients, recipes, and orders
parent
e0bb0327
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
2 deletions
+55
-2
views.py
thegoodplace/froyo/views.py
+55
-2
No files found.
thegoodplace/froyo/views.py
View file @
7309184f
from
django.shortcuts
import
render
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
# Create your views here.
# INGREDIENTS
class
IngredientListView
(
ListView
):
model
=
None
class
IngredientDetailView
(
DetailView
):
model
=
None
class
IngredientUpdateView
(
UpdateView
):
template_name_suffix
=
'_update_form.html'
class
IngredientCreateView
(
CreateView
):
template_name_suffix
=
'_create_form.html'
# RECIPES
class
RecipesListView
(
ListView
):
model
=
None
class
RecipesDetailView
(
DetailView
):
model
=
None
class
RecipesUpdateView
(
UpdateView
):
template_name_suffix
=
'_update_form.html'
class
RecipesCreateView
(
CreateView
):
template_name_suffix
=
'_create_form.html'
# ORDERS
class
OrdersListView
(
ListView
):
model
=
None
class
OrdersDetailView
(
DetailView
):
model
=
None
class
OrdersUpdateView
(
UpdateView
):
template_name_suffix
=
'_update_form.html'
class
OrdersCreateView
(
CreateView
):
template_name_suffix
=
'_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