def hello(request):
return render(request,'hello.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),
]
Python Django 编写一个简易的后台管理工具3-运行项目
原文:https://www.cnblogs.com/xiaomingtx/p/11395761.html