如果这是一个愚蠢的问题,我很抱歉。我试图找到一个解决方案几个小时,我是新手,不是很聪明。
我的网页没有显示全文。它只显示很少的文字。
视图.py:
Create your views here.
from django.template import loader
from django.http import HttpResponse
def testing(request):
html = loader.get_template('testing.html')
return HttpResponse(html)
测试.html
<html>
<body>
THIS IS A TEST PAGE.
</body>
</html>
在我的本地服务器页面上,我看到的只是:这是'>
我看不到其余的。你能告诉我有什么问题吗?太感谢了。