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