2016-10-06 3 views
-3

안녕하세요 저는 Python 및 Python 템플릿 및 Google App Engine을 처음 사용하고 있으며 오류가있는 경우 오류가있는 카드를 표시하려고합니다.Python Google App Engine If

 {% if {{error}}!="" %} 
     <div class="row center-align"> 
      <div class="col s12 m6 l6 center-align"> 
       <div class="card red lighten-1"> 
        <div class="card-content white-text"> 
         <p>{{error}}</p> 
        </div> 
       </div> 
      </div> 
     </div> 
     {% endif %} 

논리 방식처럼 보이지만 오류가 발생했습니다. 어떻게에 대한 아이디어?

+1

당신은 [mcve] 제공해야합니다. 단지 "오류"라고 말하면 우리에게 아무것도 알려주지 않습니다. –

답변

1

이미 템플릿 태그 안에있을 때 변수 태그가 필요하지 않습니다.

{% if error != '' %} 

또는 단지

{% if error %} 
관련 문제