hello.html 文件代码如下:
HelloWorld/templates/hello.html 文件代码:
<h1>{{ hello }}</h1>
HelloWorld/HelloWorld/view.py 文件代码:
# -*- coding: utf-8 -*-
#from django.http import HttpResponse
from django.shortcuts import render
def hello(request):
context = {}
context['hello'] = 'Hello World!'
return render(