编写view页面
def hello(request):
return render(request,'hello.html')
编写html页面
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>hi</title>
</head>
<body>
<p>hello</p>
</body>
</html>
编写路由
from django.conf.urls import url
from django.contrib import admin
from hello.views import *
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^hello/', hello),
]