Skip to content

Commit d8967ef

Browse files
committed
Changed the HTML for the site.
1 parent d7acce3 commit d8967ef

File tree

5 files changed

+38
-1
lines changed

5 files changed

+38
-1
lines changed

blog/templates/blog/post_list.html

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<html>
2+
<head>
3+
<title>Alex's blog</title>
4+
</head>
5+
6+
<body>
7+
<div>
8+
<h1><a href="https://djangogirls.org">Django Girls Blog</a></h1>
9+
</div>
10+
11+
<div>
12+
<p>published: 14.06.2014, 12:14</p>
13+
<h2><a href="">My first post</a></h2>
14+
<p>Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
15+
</div>
16+
17+
<div>
18+
<p>published: 14.06.2014, 12:14</p>
19+
<h2><a href="">My second post</a></h2>
20+
<p>Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut f.</p>
21+
</div>
22+
</body>
23+
</html>

blog/tests.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
from django.test import TestCase
22

33
# Create your tests here.
4+
class First_Test(TestCase):
5+
"""docstring for ."""
6+
def test_fizzbuzz(self):
7+
self.assertEqual(1,2)

blog/urls.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.urls import path
2+
from . import views
3+
4+
urlpatterns = [
5+
path('', views.post_list, name='post_list'),
6+
]

blog/views.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
from django.shortcuts import render
22

33
# Create your views here.
4+
def post_list(request):
5+
return render(request, 'blog/post_list.html', {})
6+

mysite/urls.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
1515
"""
1616
from django.contrib import admin
17-
from django.urls import path
17+
from django.urls import path, include
1818

1919
urlpatterns = [
2020
path('admin/', admin.site.urls),
21+
path('', include('blog.urls')),
2122
]

0 commit comments

Comments
 (0)