Commit 342e111a authored by Patrick James Ong's avatar Patrick James Ong

Added List, Detail, Create, and Update Page Tests for ingredients, recipes, and orders

parent 400d9b41
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(ListView): class IngredientListView(TemplateView):
model = None template_name = 'ingredients_list.html'
class IngredientDetailView(DetailView): class IngredientDetailView(TemplateView):
model = None template_name = 'ingredients_detail.html'
class IngredientUpdateView(UpdateView): class IngredientUpdateView(TemplateView):
template_name_suffix = '_update_form.html' template_name = 'ingredients_update_form.html'
class IngredientCreateView(CreateView): class IngredientCreateView(TemplateView):
template_name_suffix = '_create_form.html' template_name = 'ingredients_create_form.html'
# RECIPES # RECIPES
class RecipesListView(ListView): class RecipesListView(TemplateView):
model = None template_name = 'recipes_list.html'
class RecipesDetailView(DetailView): class RecipesDetailView(TemplateView):
model = None template_name = 'recipes_detail.html'
class RecipesUpdateView(UpdateView): class RecipesUpdateView(TemplateView):
template_name_suffix = '_update_form.html' template_name = 'recipes_update_form.html'
class RecipesCreateView(CreateView): class RecipesCreateView(TemplateView):
template_name_suffix = '_create_form.html' template_name = 'recipes_create_form.html'
# ORDERS # ORDERS
class OrdersListView(ListView): class OrdersListView(TemplateView):
model = None template_name = 'orders_list.html'
class OrdersDetailView(DetailView): class OrdersDetailView(TemplateView):
model = None template_name = 'orders_detail.html'
class OrdersUpdateView(UpdateView): class OrdersUpdateView(TemplateView):
template_name_suffix = '_update_form.html' template_name = 'orders_update_form.html'
class OrdersCreateView(CreateView): class OrdersCreateView(TemplateView):
template_name_suffix = '_create_form.html' template_name = 'orders_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