Sure, as long as when it's all said and done your view returns an HttpResponse object. The following is completely valid:
def view1(request):
# do some stuff here
return HttpResponse("some html here")
def view2(request):
return view1(request)
If you don't want to return the HttpResponse from the first view then just store it into some variable to ignore:
def view1(request):
# do some stuff here
return HttpResponse("some html here")
def view2(request):
response = view1(request)
# do some stuff here
return HttpResponse("some different html here")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…