2016-06-28 6 views
1

Why is Django blocktrans working one place and not another?에서 비슷한 질문을하고 문제의 행동을 해결하는 "i18n"응답 후 답변을 수락했습니다. 여기에, 내가보고에 대한 Pinax의 0.9a1의 템플릿에 TemplateSyntaxError 무엇입니까 특정 사용자의 추종자들은 무엇 :이 장고 템플릿을 렌더링하려면 어떻게해야합니까?

{% extends "microblogging/base.html" %} 

{% load i18n %} 
{% load avatar_tags %} 
{% load account_tags %} 

{% user_display other_user as other_user_display %} 

{% block head_title %}{% blocktrans %}Followers of {{ other_user_display }}{% endblocktrans %}{% endblock %} 

오류는 다음과 같습니다

TemplateSyntaxError at /tweets/followers/ABC/ 
Caught KeyError while rendering: u'other_user_display' 

내가 제대로 템플릿을 읽고 있어요 경우 다음 서식 파일의 마지막에서 공백이 아닌 행은 other_user_display을 정의합니다. user_display()lib/python2.7/site-packages/pinax/apps/account/utils.py으로 정의됩니다.

user_display other_user/other_user_display을 만들기 위해 수행해야 할 작업은 무엇입니까?

답변