Commit 947e514d authored by Keith Adrian Santos's avatar Keith Adrian Santos

Added the order details in froyo views, urls and test.py. Also fixed a typo in...

Added the order details in froyo views, urls and test.py. Also fixed a typo in an html. Test.py + functional_test.py work na
parent adfda84b
<!DOCTYPE html>
<html>
<head>
<title>Orders - List</title>
<title>Orders - Update</title>
</head>
<body>
<header>
......
......@@ -41,3 +41,25 @@ class IngredientsCreatePageTest(TestCase):
def test_ingredients_create_page_returns_correct_html(self):
response = self.client.get('/ingredients/create')
self.assertTemplateUsed(response, 'ingredients_create_form.html')
#Test Cases for Orders Pages!
class OrdersListPageTest(TestCase):
def test_orders_list_page_returns_correct_html(self):
response = self.client.get('/orders/list')
self.assertTemplateUsed(response, 'orders_list.html')
class OrdersDetailPageTest(TestCase):
def test_orders_detail_page_returns_correct_html(self):
response = self.client.get('/orders/detail')
self.assertTemplateUsed(response, 'orders_detail.html')
class OrdersUpdatePageTest(TestCase):
def test_orders_update_page_returns_correct_html(self):
response = self.client.get('/orders/update')
self.assertTemplateUsed(response, 'orders_update_form.html')
class OrdersCreatePageTest(TestCase):
def test_orders_create_page_returns_correct_html(self):
response = self.client.get('/orders/create')
self.assertTemplateUsed(response, 'orders_create_form.html')
\ No newline at end of file
......@@ -2,6 +2,7 @@ from django.conf.urls import url
from.views import FroyoView, IngredientsHomeView, OrdersHomeView, RecipesHomeView
from.views import IngredientsListView, IngredientsDetailView, IngredientsUpdateView, IngredientsCreateView
from.views import OrdersListView, OrdersDetailView, OrdersUpdateView, OrdersCreateView
urlpatterns = [
url(r'^$',FroyoView.as_view(),name='froyo_home'),
......@@ -13,4 +14,9 @@ urlpatterns = [
url(r'^ingredients/detail$',IngredientsDetailView.as_view(),name='ingredients_detail'),
url(r'^ingredients/update$',IngredientsUpdateView.as_view(),name='ingredients_update_form'),
url(r'^ingredients/create$',IngredientsCreateView.as_view(),name='ingredients_create_form'),
url(r'^orders/list$',OrdersListView.as_view(),name='orders_list'),
url(r'^orders/detail$',OrdersDetailView.as_view(),name='orders_detail'),
url(r'^orders/update$',OrdersUpdateView.as_view(),name='orders_update_form'),
url(r'^orders/create$',OrdersCreateView.as_view(),name='orders_create_form'),
]
\ No newline at end of file
......@@ -26,3 +26,16 @@ class IngredientsUpdateView(TemplateView):
class IngredientsCreateView(TemplateView):
template_name = "ingredients_create_form.html"
#Views for Orders Pages
class OrdersListView(TemplateView):
template_name = "orders_list.html"
class OrdersDetailView(TemplateView):
template_name = "orders_detail.html"
class OrdersUpdateView(TemplateView):
template_name = "orders_update_form.html"
class OrdersCreateView(TemplateView):
template_name = "orders_create_form.html"
\ No newline at end of file
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