Commit 136a3bea authored by Keith Adrian Santos's avatar Keith Adrian Santos

added home pages for ingredients,orders and recipies in views, urls and...

added home pages for ingredients,orders and recipies in views, urls and test.py. Test.py works but functional test doesnt idk why.
parent e85897f2
......@@ -3,6 +3,21 @@ from django.test import TestCase
class FroyoHomePageTest(TestCase):
def test_froyo_home_page_returns_correct_html(self):
response = self.client.get('/froyo')
response = self.client.get('/')
self.assertTemplateUsed(response,'froyo_home.html')
class IngredientsPageTest(TestCase):
def test_ingredients_home_page_returns_correct_html(self):
response = self.client.get('/ingredients')
self.assertTemplateUsed(response, 'ingredients_home.html')
class OrdersPageTest(TestCase):
def test_orders_home_page_returns_correct_html(self):
response = self.client.get('/orders')
self.assertTemplateUsed(response, 'orders_home.html')
class RecipesPageTest(TestCase):
def test_recipes_home_page_returns_correct_html(self):
response = self.client.get('/recipes')
self.assertTemplateUsed(response, 'recipes_home.html')
# Create your tests here.
from django.conf.urls import url
from.views import FroyoView
from.views import FroyoView, IngredientsHomeView, OrdersHomeView, RecipesHomeView
urlpatterns = [
url(r'^froyo$',FroyoView.as_view(),name='froyo_list'),
url(r'^$',FroyoView.as_view(),name='froyo_home'),
url(r'^ingredients$',IngredientsHomeView.as_view(),name='ingredients_home'),
url(r'^orders$',OrdersHomeView.as_view(),name='orders_home'),
url(r'^recipes$',RecipesHomeView.as_view(),name='recipies_home'),
]
\ No newline at end of file
......@@ -3,3 +3,12 @@ from django.views.generic.base import TemplateView
# Create your views here.
class FroyoView(TemplateView):
template_name = "froyo_home.html"
class IngredientsHomeView(TemplateView):
template_name = "ingredients_home.html"
class OrdersHomeView(TemplateView):
template_name = "orders_home.html"
class RecipesHomeView(TemplateView):
template_name = "recipes_home.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