Commit 31def305 authored by Moira's avatar Moira

edited froyo views and urls

parent 8a21aab0
from django.conf.urls import url
from .views import home_page
from .views import ingredients_list
from .views import ingredients_detail
from .views import ingredients_update_form
from .views import ingredients_create_form
from .views import recipes_list
from .views import recipes_detail
from .views import recipes_update_form
from .views import recipes_create_form
from .views import orders_list
from .views import orders_detail
from .views import orders_update_form
from .views import orders_create_form
urlpatterns = [
path('home', home_page, name='home_page'),
path('ingredients/list', ingredients_list, name='ingredients_list'),
path('ingredients/detail', ingredients_detail, name='ingredients_detail'),
path('ingredients/update_form', ingredients_update_form, name='ingredients_update_form'),
path('ingredients/create_form', ingredients_create_form, name='ingredients_create_form'),
path('recipes/list', recipes_list, name='recipes_list'),
path('recipes/detail', recipes_detail, name='recipes_detail'),
path('recipes/update_form', recipes_update_form, name='recipes_update_form'),
path('recipes/create_form', recipes_create_form, name='recipes_create_form'),
path('orders/list', orders_list, name='orders_list'),
path('orders/detail', orders_detail, name='orders_detail'),
path('orders/update_form', orders_update_form, name='orders_update_form'),
path('orders/create_form', orders_create_form, name='recipes_create_form'),
]
......@@ -2,4 +2,41 @@ from django.shortcuts import render
# Create your views here.
def home_page(request):
return render(request, 'home_page.html')
def ingredients_list(request):
return render(request,'ingredients_list.html')
def ingredients_detail(request):
return render(request,'ingredients_detail.html')
def ingredients_update_form(request):
return render(request,'ingredients_update_form.html')
def ingredients_create_form(request):
return render(request,'ingredients_create_form.html')
def recipes_list(request):
return render(request,'recipes_list.html')
def recipes_detail(request):
return render(request,'recipes_detail.html')
def recipes_update_form(request):
return render(request,'recipes_update_form.html')
def recipes_create_form(request):
return render(request,'recipes_create_form.html')
def orders_list(request):
return render(request,'orders_list.html')
def orders_detail(request):
return render(request,'orders_detail.html')
def orders_update_form(request):
return render(request,'orders_update_form.html')
def orders_create_form(request):
return render(request,'orders_create_form.html')
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