Commit 3da16ca3 authored by Dirk Reyes's avatar Dirk Reyes

Fixed a few syntax errors

parent 2d8084f2
Pipeline #1149 canceled with stages
......@@ -2,60 +2,60 @@ from django.test import TestCase
class CheckIngredientsList(TestCase):
def check_if_ingredients_list_views(self):
response= self.client.get('ingredients/list/')
self.assertTemplateUsed(response, "ingredients_list.html")
response= self.client.get('ingredients/list/')
self.assertTemplateUsed(response, "ingredients_list.html")
class CheckIngredientsDetail(TestCase):
def check_if_ingredients_detail_views(self):
response= self.client.get('ingredients/detail/')
self.assertTemplateUsed(response, "ingredients_detail.html")
response= self.client.get('ingredients/detail/')
self.assertTemplateUsed(response, "ingredients_detail.html")
class CheckIngredientsUpdateForm(TestCase):
def check_if_ingredients_update_form_views(self):
response= self.client.get('ingredients/update_form/')
self.assertTemplateUsed(response, "ingredients_update_form.html")
response= self.client.get('ingredients/update_form/')
self.assertTemplateUsed(response, "ingredients_update_form.html")
class CheckIngredientsCreateForm(TestCase):
def check_if_ingredients_create_form_views(self):
response= self.client.get('ingredients/create_form/')
self.assertTemplateUsed(response, "ingredients_create_form.html")
response= self.client.get('ingredients/create_form/')
self.assertTemplateUsed(response, "ingredients_create_form.html")
class CheckRecipesList(TestCase):
def check_if_recipes_list_views(self):
response= self.client.get('recipes/list/')
self.assertTemplateUsed(response, "recipes_list.html")
response= self.client.get('recipes/list/')
self.assertTemplateUsed(response, "recipes_list.html")
class CheckRecipesDetail(TestCase):
def check_if_recipes_detail_views(self):
response= self.client.get('recipes/detail/')
self.assertTemplateUsed(response, "recipes_detail.html")
response= self.client.get('recipes/detail/')
self.assertTemplateUsed(response, "recipes_detail.html")
class CheckRecipesUpdateForm(TestCase):
def check_if_recipes_update_form_views(self):
response= self.client.get('recipes/update_form/')
self.assertTemplateUsed(response, "recipes_update_form.html")
response= self.client.get('recipes/update_form/')
self.assertTemplateUsed(response, "recipes_update_form.html")
class CheckRecipesCreateForm(TestCase):
def check_if_recipes_create_form_views(self):
response= self.client.get('recipes/create_form/')
self.assertTemplateUsed(response, "recipes_create_form.html")
response= self.client.get('recipes/create_form/')
self.assertTemplateUsed(response, "recipes_create_form.html")
class CheckOrdersList(TestCase):
def check_if_orders_list_views(self):
response= self.client.get('orders/list/')
self.assertTemplateUsed(response, "orders_list.html")
response= self.client.get('orders/list/')
self.assertTemplateUsed(response, "orders_list.html")
class CheckOrdersDetail(TestCase):
def check_if_orders_detail_views(self):
response= self.client.get('orders/detail/')
self.assertTemplateUsed(response, "orders_detail.html")
response= self.client.get('orders/detail/')
self.assertTemplateUsed(response, "orders_detail.html")
class CheckOrdersUpdateForm(TestCase):
def check_if_orders_update_form_views(self):
response= self.client.get('orders/update_form/')
self.assertTemplateUsed(response, "orders_update_form.html")
response= self.client.get('orders/update_form/')
self.assertTemplateUsed(response, "orders_update_form.html")
class CheckOrdersCreateForm(TestCase):
def check_if_orders_create_form_views(self):
response= self.client.get('orders/create_form/')
self.assertTemplateUsed(response, "orders_create_form.html")
response= self.client.get('orders/create_form/')
self.assertTemplateUsed(response, "orders_create_form.html")
from django.confs.url import url
from django.conf.urls import url
from .views import IngredientsList, IngredientsDetail, IngredientsUpdateForm, IngredientsCreateForm, RecipesList, RecipesDetail, RecipesUpdateForm, RecipesCreateForm, OrdersList, OrdersDetail, OrdersUpdateForm, OrdersCreateForm
urlpatterns=[
url(r'^ingredients/list/$', IngredientsList.as_view(), name"ingredients_list"),
url(r'^ingredients/detail/$', IngredientsDetail.as_view(), name"ingredients_detail"),
url(r'^ingredients/update_form/$', IngredientsUpdateForm.as_view(), name"ingredients_update_form"),
url(r'^ingredients/create_form/$', IngredientsCreateForm.as_view(), name"ingredients_create_form"),
url(r'^recipes/list/$', RecipesList.as_view(), name"recipes_list"),
url(r'^recipes/detail/$', RecipesDetail.as_view(), name"recipes_detail"),
url(r'^recipes/update_form/$', RecipesUpdateForm.as_view(), name"recipes_update_form"),
url(r'^recipes/create_form/$', RecipesCreateForm.as_view(), name"recipes_create_form"),
url(r'^orders/list/$', OrdersList.as_view(), name"orders_list"),
url(r'^orders/detail/$', OrdersDetail.as_view(), name"orders_detail"),
url(r'^orders/update_form/$', OrdersUpdateForm.as_view(), name"orders_update_form"),
url(r'^orders/create_form/$', OrdersCreateForm.as_view(), name"orders_create_form"),
url(r'^ingredients/list/$', IngredientsList.as_view(), name='ingredients_list'),
url(r'^ingredients/detail/$', IngredientsDetail.as_view(), name='ingredients_detail'),
url(r'^ingredients/update_form/$', IngredientsUpdateForm.as_view(), name='ingredients_update_form'),
url(r'^ingredients/create_form/$', IngredientsCreateForm.as_view(), name='ingredients_create_form'),
url(r'^recipes/list/$', RecipesList.as_view(), name='recipes_list'),
url(r'^recipes/detail/$', RecipesDetail.as_view(), name='recipes_detail'),
url(r'^recipes/update_form/$', RecipesUpdateForm.as_view(), name='recipes_update_form'),
url(r'^recipes/create_form/$', RecipesCreateForm.as_view(), name='recipes_create_form'),
url(r'^orders/list/$', OrdersList.as_view(), name='orders_list'),
url(r'^orders/detail/$', OrdersDetail.as_view(), name='orders_detail'),
url(r'^orders/update_form/$', OrdersUpdateForm.as_view(), name='orders_update_form'),
url(r'^orders/create_form/$', OrdersCreateForm.as_view(), name='orders_create_form')
]
\ No newline at end of file
......@@ -2,37 +2,37 @@ from django.views.generic.base import TemplateView
class IngredientsList(TemplateView):
template_name="ingredients_list.html"
template_name='ingredients_list.html'
class IngredientsDetail(TemplateView):
template_name="ingredients_detail.html"
template_name='ingredients_detail.html'
class IngredientsUpdateForm(TemplateView):
template_name="ingredients_update_form.html"
template_name='ingredients_update_form.html'
class IngredientsCreateForm(TemplateView):
template_name="ingredients_create_form.html"
template_name='ingredients_create_form.html'
class RecipesList(TemplateView):
template_name="recipes_list.html"
template_name='recipes_list.html'
class RecipesDetail(TemplateView):
template_name="recipes_detail.html"
template_name='recipes_detail.html'
class RecipesUpdateForm(TemplateView):
template_name="recipes_update_form.html"
template_name='recipes_update_form.html'
class RecipesCreateForm(TemplateView):
template_name="recipes_create_form.html"
template_name='recipes_create_form.html'
class OrdersList(TemplateView):
template_name="orders_list.html"
template_name='orders_list.html'
class OrdersDetail(TemplateView):
template_name="orders_detail.html"
template_name='orders_detail.html'
class OrdersUpdateForm(TemplateView):
template_name="orders_update_form.html"
template_name='orders_update_form.html'
class OrdersCreateForm(TemplateView):
template_name="orders_create_form.html"
template_name='orders_create_form.html'
......@@ -18,5 +18,6 @@ from django.contrib import admin
urlpatterns = [
url(r'', include('appname.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