Fixed typos in views, test, and urls, added a line to fix 'template does not...

Fixed typos in views, test, and urls, added a line to fix 'template does not exist' error in settings
parent 2079bf36
from django.test import TestCase from django.test import TestCase
from django.urls import resolve from django.urls import resolve
from django.http import HttpRequest from django.http import HttpRequest
from .views import IngredientsListView, IngredientsDetailView, IngredientsUpdateView, IngredientsCreateView, RecipesListView, RecipesDetailView, RecipesUpdateView, RecipesCreateView, OrdersListView, OrdersDetailView, OrdersUpdateView, OrdersCreateView
#ingredients model #ingredients model
......
from django.conf.urls import url from django.conf.urls import url
from .views import HomeTemplateView, CloudTemplateView, JesterTemplateView, SunfloweyTemplateView
urlpatterns = [
url(r'^$', HomeTemplateView.as_view(), name='home'),
url(r'^hero/cloud/$', CloudTemplateView.as_view(), name='detail_cloud'),
url(r'^hero/jester/$', JesterTemplateView.as_view(), name='detail_jester'),
url(r'^hero/sunflowey/$', SunfloweyTemplateView.as_view(), name='detail_sunflowey'),
]
from django.conf.urls import url
from .views import IngredientsListView, IngredientsDetailView, IngredientsUpdateView, IngredientsCreateView, RecipesListView, RecipesDetailView, RecipesUpdateView, RecipesCreateView, OrdersListView, OrdersDetailView, OrdersUpdateView, OrdersCreateView from .views import IngredientsListView, IngredientsDetailView, IngredientsUpdateView, IngredientsCreateView, RecipesListView, RecipesDetailView, RecipesUpdateView, RecipesCreateView, OrdersListView, OrdersDetailView, OrdersUpdateView, OrdersCreateView
urlpatterns = [ urlpatterns = [
......
...@@ -15,7 +15,7 @@ class IngredientsUpdateView(TemplateView): ...@@ -15,7 +15,7 @@ class IngredientsUpdateView(TemplateView):
template_name = 'ingredients_update_form.html' template_name = 'ingredients_update_form.html'
class IngredientsUpdateView(TemplateView): class IngredientsCreateView(TemplateView):
template_name = 'ingredients_create_form.html' template_name = 'ingredients_create_form.html'
......
...@@ -6,7 +6,7 @@ from selenium import webdriver ...@@ -6,7 +6,7 @@ from selenium import webdriver
class NewVisitorTest(unittest.TestCase): class NewVisitorTest(unittest.TestCase):
def setUp(self): def setUp(self):
self.browser = webdriver.Firefox() self.browser = webdriver.Chrome()
def tearDown(self): def tearDown(self):
self.browser.quit() self.browser.quit()
...@@ -88,6 +88,8 @@ class NewVisitorTest(unittest.TestCase): ...@@ -88,6 +88,8 @@ class NewVisitorTest(unittest.TestCase):
#self.assertIn('', self.browser.find_element_by_id('new_size').text) #self.assertIn('', self.browser.find_element_by_id('new_size').text)
#self.assertIn('', self.browser.find_element_by_id('new_base_recipe').text) #self.assertIn('', self.browser.find_element_by_id('new_base_recipe').text)
#self.assertIn('',self.browser.find_element_by_id('new_customization').text) #self.assertIn('',self.browser.find_element_by_id('new_customization').text)
self.fail('Finish the test!')
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -55,7 +55,7 @@ ROOT_URLCONF = 'thegoodplace.urls' ...@@ -55,7 +55,7 @@ ROOT_URLCONF = 'thegoodplace.urls'
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [], 'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'froyo', 'templates')],
'APP_DIRS': True, 'APP_DIRS': True,
'OPTIONS': { 'OPTIONS': {
'context_processors': [ 'context_processors': [
......
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