2011-05-13 4 views
3
{% for x in featured %} 
<li class="panel"> 
    <h3> 
     {% if x.title|length > 12 %} 
     {{x.title|slice:":12"}}... 
     {% else %} 
     {{x.title}} 
     {% endif %} 
    </h3> 
    <h4> 
     {% if x.details|length > 30 %} 
     {{x.details|slice:":30"}}... 
     {% else %} 
     {{x.details}} 
     {% endif %} 
    </h4> 

    <p class="btnlinks"> 
     <i>noch <span>{{x.free_lots}}</span> lose</i> 
     <a href="{{base_url}}ProductDetails/?lotid={{x.lotteryid.0}}" class="btn">zuR verlosung</a> 
     <a href="{{base_url}}ProductDetails/?lotid={{x.lotteryid.0}}" class="mainlinkto"><img src="{{ STATIC_PREFIX }}images/base/arrowyellow.png" /></a> 
    </p> 
    <p class="slids"><img src="data:image/gif;base64,{{x.picture}}" ></p> 
</li> 
{% endfor %} 

번역하고 싶습니다 zuR verlosung, noch, 잃어 버려요. 내가 trans 또는 block trans을 사용하면 템플릿에 .am error라고 표시됩니다. error장고 템플릿

Invalid block tag: 'blocktrans', expected 'empty' oder 'endfor' 

미리 감사드립니다.

답변

8

the docs :

템플릿에이 태그에 대한 액세스 권한을 부여하려면 템플릿 상단에 {% load i18n %}을 입력하십시오.