Commit 7c8bf5e2 authored by thisLexic's avatar thisLexic

homepage is accessible but it cointains no content yet

parent 38537e76
This diff is collapsed.
from selenium import webdriver from selenium import webdriver
import unittest import unittest
import time
class NewVisitorTest(unittest.TestCase): class NewVisitorTest(unittest.TestCase):
def setUp(self): def setUp(self):
self.browser = webdriver.Firefox() self.browser = webdriver.Firefox()
...@@ -11,4 +13,9 @@ class NewVisitorTest(unittest.TestCase): ...@@ -11,4 +13,9 @@ class NewVisitorTest(unittest.TestCase):
def test_can_display_a_heroes_list_and_more_information_per_hero(self): def test_can_display_a_heroes_list_and_more_information_per_hero(self):
# Widget has heard about a new wiki app for the game called The Will of the Wisps. # Widget has heard about a new wiki app for the game called The Will of the Wisps.
# She goes to check out its homepage # She goes to check out its homepage
self.browser.get('http://localhost:8000/')
\ No newline at end of file # self.browser.get('http://127.0.0.1:8000/')
self.browser.get('http://127.0.0.1:8000')
self.fail('Finish the test!')
\ No newline at end of file
from django.conf.urls import url
from .views import home_page
urlpatterns = [
url(r'^$', home_page, name = 'home_page'),
]
\ No newline at end of file
from django.shortcuts import render from django.shortcuts import render
from django.http import HttpResponse
# Create your views here. def home_page(request):
return HttpResponse('hi')
\ No newline at end of file
...@@ -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 url, include
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('heroes.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