Commit 7309184f authored by Patrick James Ong's avatar Patrick James Ong

Created views for ingredients, recipes, and orders

parent e0bb0327
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'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment