Commit b211f093 authored by KY-2187's avatar KY-2187

updated urls.py and views.py

parent f50f7787
from django.conf.urls import urls
from .views import IngredientsListView
\ No newline at end of file
from django.shortcuts import render from django.shortcuts import render
from django.views.generic import TemplateView
# Create your views here.
class IngredientsListView(TemplateView):
template_name = 'ingredients_list.html'
class IngredientsDetailView(TemplateView):
template_name = 'ingredients_detail.html'
class IngredientsUpdateView(TemplateView):
template_name = 'ingredients_update_form.html'
class IngredientsCreateView(TemplateView):
template_name = 'ingredients_create_form.html'
class RecipesListView(TemplateView):
template_name = 'recipes_list.html'
class RecipesDetailView(TemplateView):
template_name = 'recipes_detail.html'
class RecipesUpdateView(TemplateView):
template_name = 'recipes_update_form.html'
class RecipesCreateView(TemplateView):
template_name = 'recipes_create_form.html'
class OrdersListView(TemplateView):
template_name = 'orders_list.html'
class OrdersDetailView(TemplateView):
template_name = 'orders_detail.html'
class OrdersUpdateView(TemplateView):
template_name = 'orders_update_form.html'
class OrdersCreateView(TemplateView):
template_name = 'orders_create_form.html'
"""thegoodplace URL Configuration from django.conf.urls import include, url
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import 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