2
저는 샘플 앱을 사용하는 장고에 대한 완전한 신입 사원입니다. 장고에서 템플릿이 작동하는 방식으로 뭔가 빠져있는 것처럼 보입니다.렌더 템플릿 Django와 정확히 일치
<!DOCTYPE HTML>
<html>
<head>
<title>Zabba Dabba Doo</title>
</head>
<body>
<h1>Zabba Dabba Doo</h1>
<form action="/comparison/search/" method="get">
Search: <input type="text" name="search_terms" />
<input type="submit" value="Search" />
</form>
</body>
</html>
views.py 방법은 여기에 있습니다 : :
def home(request):
t = loader.get_template('comparison/index.html')
return HttpResponse(t)
내 템플릿에서 HTML을 렌더링 할 뷰 방식을 기대하고 있지만, 경우에 다음과 같이
나는 템플릿 파일이 테스트 결과, 결과는 다음과 같습니다.
<Text Node: '<!DOCTYPE HTML>
<html>
<h'>
누구든지 내 템플릿을 어떻게 만들 수 있는지 설명 할 수 있습니까? 정확히 표시 되었습니까? 어떤 도움을 주셔서 감사합니다.
안녕하세요 에이 블램 스, 내 질문에 대한 답변을 볼 수 있습니까? http://stackoverflow.com/questions/31085439/render-to-response-or-redirect-changes-the-template-elements-in-django-1-8 –