Skip to content

Commit

Permalink
Changed the HTML for the site
Browse files Browse the repository at this point in the history
  • Loading branch information
nyj001012 committed Jul 31, 2019
1 parent 226a4ae commit c31f274
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions blog/templates/blog/post_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<html>
<head>
<title>Yejin's blog</title>
</head>
<body>
<p>Hi there!</p>
<p>it works!</p>
</body>
</html>
6 changes: 6 additions & 0 deletions blog/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.urls import path
from . import views

urlpatterns = [
path('', views.post_list, name="post_list"),
]
2 changes: 2 additions & 0 deletions blog/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from django.shortcuts import render

# Create your views here.
def post_list(request):
return render(request, 'blog/post_list.html', {})
3 changes: 2 additions & 1 deletion mysite/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
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')),
]

0 comments on commit c31f274

Please sign in to comment.