Commit ab29e26d authored by Kevin Sibug's avatar Kevin Sibug

Added views to display each template

parent 5f85a1b9
Pipeline #1148 failed with stages
from django.shortcuts import render from django.shortcuts import render
from django.views.generic.base import TemplateView
from django.views.generic import DetailView,ListView,CreateView,UpdateView
#Ingredients Views
class IngredientsList(TemplateView):
template_name = "ingredients_list.html"
class IngredientsDetail(TemplateView):
template_name = "ingredients_detail.html"
class IngredientsUpdate(TemplateView):
template_name = "ingredients_update_form.html"
class IngredientsCreate(TemplateView):
template_name = "ingredients_create_form.html"
#Recipes Views
class RecipesList(TemplateView):
template_name = "recipes_list.html"
class RecipesDetail(TemplateView):
template_name = "recipes_detail.html"
class RecipesUpdate(TemplateView):
template_name = "recipes_update_form.html"
class RecipesCreate(TemplateView):
template_name = "recipes_create_form.html"
#Orders Views
class OrdersList(TemplateView):
template_name = "orders_list.html"
class OrdersDetail(TemplateView):
template_name = "orders_detail.html"
class OrdersUpdate(TemplateView):
template_name = "orders_update_form.html"
class OrdersCreate(TemplateView):
template_name = "orders_create_form.html"
# Create your views here.
...@@ -37,6 +37,7 @@ INSTALLED_APPS = [ ...@@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'froyo'
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
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