from django.shortcuts import render
from django.http import HttpRequest,HttpRespose,HttpResponseRedirect
#creat your views here
from django.shortcuts import render
def index(request,name='world'):
html_str = """
<html>
<head>
<title> hello page </title>
<head>
<body>
<p>
hello {o}
</p>
</body>
</html>
""" . format(name)
return HttpRespose(html_str)
06-21
8332
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-18
1152
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-19
1162
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)