Commit c9147998 authored by Alex Bernard Francia's avatar Alex Bernard Francia

Set up froyo views.py, urls.py. Edited thegoodplace urls.py.

parent 4d9a6cd4
from django.conf.urls import url
# from .views import go_to_home_page
from .views import go_to_ingredients_detail
from .views import go_to_ingredients_list
from .views import go_to_ingredients_update_form
from .views import go_to_ingredients_create_form
from .views import go_to_orders_create_form
from .views import go_to_orders_detail
from .views import go_to_orders_list
from .views import go_to_orders_update_form
from .views import go_to_recipes_create_form
from .views import go_to_recipes_detail
from .views import go_to_recipes_list
from .views import go_to_recipes_update_form
urlpatterns = [
# url(r'^thegoodplace$', go_to_home_page,name='homepage'),
url(r'^ingredients/detail$', go_to_ingredients_detail,name='ingredients_detail'),
url(r'^ingredients/list$', go_to_ingredients_list,name='ingredients_list'),
url(r'^ingredients/update$', go_to_ingredients_update_form,name='ingredients_update_form'),
url(r'^ingredients/create$', go_to_ingredients_create_form,name='ingredients_create_form'),
url(r'^orders/detail$', go_to_orders_detail,name='orders_detail'),
url(r'^orders/list$', go_to_orders_list,name='orders_list'),
url(r'^orders/update$', go_to_orders_update_form,name='orders_update_form'),
url(r'^orders/create$', go_to_orders_create_form,name='orders_create_form'),
url(r'^recipes/detail$', go_to_recipes_detail,name='recipes_detail'),
url(r'^recipes/list$', go_to_recipes_list,name='recipes_list'),
url(r'^recipes/update$', go_to_recipes_update_form,name='recipes_update_form'),
url(r'^recipes/create$', go_to_recipes_create_form,name='recipes_create_form'),
]
\ No newline at end of file
from django.shortcuts import render from django.shortcuts import render
# from django.http import HttpResponse
def go_to_ingredients_create_form(request):
return render(request,'ingredients_create_form.html')
def go_to_ingredients_detail(request):
return render(request,"ingredients_detail.html")
def go_to_ingredients_list(request):
return render(request,"ingredients_list.html")
def go_to_ingredients_update_form(request):
return render(request,"ingredients_update_form.html")
def go_to_orders_create_form(request):
return render(request,'orders_create_form.html')
def go_to_orders_detail(request):
return render(request,"orders_detail.html")
def go_to_orders_list(request):
return render(request,"orders_list.html")
def go_to_orders_update_form(request):
return render(request,"orders_update_form.html")
def go_to_recipes_create_form(request):
return render(request,'recipes_create_form.html')
def go_to_recipes_detail(request):
return render(request,"recipes_detail.html")
def go_to_recipes_list(request):
return render(request,"recipes_list.html")
def go_to_recipes_update_form(request):
return render(request,"recipes_update_form.html")
# Create your views here. # Create your views here.
...@@ -13,9 +13,10 @@ Including another URLconf ...@@ -13,9 +13,10 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include 1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
""" """
from django.conf.urls import url from django.conf.urls import include, url
from django.contrib import admin 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