Changed the HTML for the site.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -10,3 +10,5 @@ BOOTNXT
|
||||
Boot/
|
||||
System Volume Information/
|
||||
bootmgr
|
||||
配置文件.txt
|
||||
from whitenoise.py
|
||||
26
blog/templates/blog/post_list.html
Normal file
26
blog/templates/blog/post_list.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Django Girls blog</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1><a href="">Django Girls Blog</a></h1>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>published: 14.06.2014, 12:14</p>
|
||||
<h2><a href="">My first post</a></h2>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>published: 14.06.2014, 12:14</p>
|
||||
<h2><a href="">My second post</a></h2>
|
||||
<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>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
6
blog/urls.py
Normal file
6
blog/urls.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.urls import path,include
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('',views.post_list,name='post_list'),
|
||||
]
|
||||
@@ -1,3 +1,5 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
def post_list(request):
|
||||
return render(request, 'blog/post_list.html', {})
|
||||
@@ -14,8 +14,9 @@ Including another URLconf
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.urls import path,include
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('',include('blog.urls')),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user