猿问

django

请问,django中怎么写view文件呢

qq_极客_3
浏览 1229回答 1
1回答

莼羹鲈鲙非吾好

from django.shortcuts import renderfrom django.http import HttpResponse# Create your views here.def getform(request):     context = {}     context['hello'] = 'Hello World!'     return render(request, 'temp.html', context)def getHellworld(request):     return HttpResponse('hello world')
随时随地看视频慕课网APP

相关分类

Python
我要回答