Modified the urls and the views python files

parent b0ab064f
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class FroyoConfig(AppConfig):
name = 'froyo'
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.conf.urls import url
from .views import home_page
from .views import ingredients_list_page
from .views import ingredients_detail_page
from .views import ingredients_update_form_page
from .views import ingredients_create_form_page
from .views import recipes_list_page
from .views import recipes_detail_page
from .views import recipes_update_form_page
from .views import recipes_create_form_page
from .views import orders_list_page
from .views import orders_detail_page
from .views import orders_update_form_page
from .views import orders_create_form_page
urlpatterns = [
url(r'^$', home_page.as_view(), name = 'home_page'),
url(r'^froyo/$', home_page.as_view(), name = 'home_page'),
url(r'^froyo/ingredients_list$', ingredients_list_page.as_view(), name = 'ingredients_list'),
url(r'^froyo/ingredients_detail$', ingredients_detail_page.as_view(), name = 'ingredients_detail'),
url(r'^froyo/ingredients_update_form$', ingredients_update_form_page.as_view(), name = 'ingredients_update_form'),
url(r'^froyo/ingredients_create_form$', ingredients_create_form_page.as_view(), name = 'ingredients_create_form'),
url(r'^froyo/recipes_list$', recipes_list_page.as_view(), name = 'recipes_list'),
url(r'^froyo/recipes_detail$', recipes_detail_page.as_view(), name = 'recipes_detail'),
url(r'^froyo/recipes_update_form$', recipes_update_form_page.as_view(), name = 'recipes_update_form'),
url(r'^froyo/recipes_create_form$', recipes_create_form_page.as_view(), name = 'recipes_create_form'),
url(r'^froyo/orders_list$', orders_list_page.as_view(), name = 'orders_list'),
url(r'^froyo/orders_detail$', orders_detail_page.as_view(), name = 'orders_detail'),
url(r'^froyo/orders_update_form$', orders_update_form_page.as_view(), name = 'orders_update_form'),
url(r'^froyo/orders_create_form$', orders_create_form_page.as_view(), name = 'orders_create_form'),
]
from django.views.generic.base import TemplateView
class home_page(TemplateView):
template_name = 'froyo/homepage.html'
class ingredients_list_page(TemplateView):
template_name = 'froyo/ingredients_list.html'
class ingredients_detail_page(TemplateView):
template_name = 'froyo/ingredients_detail.html'
class ingredients_update_form_page(TemplateView):
template_name = 'froyo/ingredients_update_form.html'
class ingredients_create_form_page(TemplateView):
template_name = 'froyo/ingredients_create_form.html'
class recipes_list_page(TemplateView):
template_name = 'froyo/recipes_list.html'
class recipes_detail_page(TemplateView):
template_name = 'froyo/recipes_detail.html'
class recipes_update_form_page(TemplateView):
template_name = 'froyo/recipes_update_form.html'
class recipes_create_form_page(TemplateView):
template_name = 'froyo/recipes_create_form.html'
class orders_list_page(TemplateView):
template_name = 'froyo/orders_list.html'
class orders_detail_page(TemplateView):
template_name = 'froyo/orders_detail.html'
class orders_update_form_page(TemplateView):
template_name = 'froyo/orders_update_form.html'
class orders_create_form_page(TemplateView):
template_name = 'froyo/orders_create_form.html'
from selenium import webdriver
import unittest
class NewVisitorTest(unittest.TestCase):
\ No newline at end of file
......@@ -18,4 +18,5 @@ from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'', include('froyo.urls'))
]
......@@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'froyo'
]
MIDDLEWARE = [
......
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