Added URLs.

parent c02a9d2c
from django.conf.urls import url
from .views import HomeView
urlpatterns = [
url(r'^$', HomeView_.asView(), name='home'),
url(r'^orders$', OrdersListView.asView(), name='orders-list'),
url(r'^orders/detail$', OrdersDetailsView.asView(), name='orders-detail'),
url(r'^orders/update$', OrdersUpdateView.asView(), name='orders-update'),
url(r'^orders/create$', OrdersCreateView.asView(), name='orders-create'),
url(r'^recipes$', RecipesListView.asView(), name='recipes-list'),
url(r'^recipes/detail$', RecipesDetailsView.asView(), name='recipes-detail'),
url(r'^recipes/update$', RecipesUpdateView.asView(), name='recipes-update'),
url(r'^recipes/create$', RecipesCreateView.asView(), name='recipes-create'),
url(r'^ingredients$', IngredientsListView.asView(), name='ingredients-list'),
url(r'^ingredients/detail$', IngredientsDetailsView.asView(), name='ingredients-detail'),
url(r'^ingredients/update$', IngredientsUpdateView.asView(), name='ingredients-update'),
url(r'^ingredients/create$', IngredientsCreateView.asView(), name='ingredients-create'),
]
...@@ -19,7 +19,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -19,7 +19,7 @@ class NewVisitorTest(unittest.TestCase):
def test_can_add_orders(self): def test_can_add_orders(self):
#A customer orders a certain froyo. An employee processes the order, verifying that they are on the correct page. #A customer orders a certain froyo. An employee processes the order, verifying that they are on the correct page.
self.browser.get('http://localhost:8000/orders/list') self.browser.get('http://localhost:8000/orders')
self.assertIn('Orders - List', self.browser.title) self.assertIn('Orders - List', self.browser.title)
#They add the order into the list after seeing a button in the page that would allow them to do so. #They add the order into the list after seeing a button in the page that would allow them to do so.
...@@ -35,7 +35,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -35,7 +35,7 @@ class NewVisitorTest(unittest.TestCase):
def test_can_add_recipes(self): def test_can_add_recipes(self):
#The employees came up with a new recipe, deciding to add it to the list. One of them goes to the list. #The employees came up with a new recipe, deciding to add it to the list. One of them goes to the list.
self.browser.get('http://localhost:8000/recipes/list') self.browser.get('http://localhost:8000/recipes')
self.assertIn('Recipes - List', self.browser.title) self.assertIn('Recipes - List', self.browser.title)
#They add the recipe into the list after seeing a button in the page that would allow them to do so. #They add the recipe into the list after seeing a button in the page that would allow them to do so.
...@@ -52,7 +52,7 @@ class NewVisitorTest(unittest.TestCase): ...@@ -52,7 +52,7 @@ class NewVisitorTest(unittest.TestCase):
def test_can_add_ingredients(self): def test_can_add_ingredients(self):
#One of the employees, a deliveryman, arrive with a package of dry ice. Wishing to keep track of the change, #One of the employees, a deliveryman, arrive with a package of dry ice. Wishing to keep track of the change,
#They add it to the list. #They add it to the list.
self.browser.get('http://localhost:8000/ingredients/list') self.browser.get('http://localhost:8000/ingredients')
self.assertIn('ingredients - List', self.browser.title) self.assertIn('ingredients - List', self.browser.title)
#After some looking, they find a button that would allow them to add their ingredients. #After some looking, they find a button that would allow them to add their ingredients.
......
...@@ -18,4 +18,5 @@ from django.contrib import admin ...@@ -18,4 +18,5 @@ from django.contrib import admin
urlpatterns = [ urlpatterns = [
url(r'^admin/', admin.site.urls), url(r'^admin/', admin.site.urls),
url(r'', include('froyo.urls'))
] ]
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