Commit c30e8b9e authored by Carlowsss's avatar Carlowsss

Setup urls, tested and created home page

parent 1155bd9d
<html>
<head>
<title>The Good Place FroYo Shop</title>
</head>
<h1>The Good Place FroYo Shop</h1>
</html>
from django.test import TestCase
# Create your tests here.
class HomePageTest(TestCase):
def test_home_page_returns_correct_html(self):
response = self.client.get('/')
self.assertTemplateUsed(response, 'home.html')
from django.conf.urls import url
from .views import HomePageView
urlpatterns = [
url(r'^$', HomePageView.as_view(), name='home'),
]
\ No newline at end of file
from django.shortcuts import render
from django.views.generic.base import TemplateView
# Create your views here.
class HomePageView(TemplateView):
template_name = "home.html"
\ No newline at end of file
......@@ -13,9 +13,10 @@ 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.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
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