Python论坛  - 讨论区

标题:[python-chinese] django中temple language不支持list-index lookup

2007年01月06日 星期六 15:57

brightman fenyon在126.com
星期六 一月 6 15:57:33 HKT 2007

一个HTML附件被移除...
URL: http://python.cn/pipermail/python-chinese/attachments/20070106/ea0aff09/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年01月06日 星期六 16:40

yi huang yi.codeplayer在gmail.com
星期六 一月 6 16:40:25 HKT 2007

On 1/6/07, brightman <fenyon at 126.com> wrote:
>
>  template文档说支持List-index lookup. Example: foo[bar]。
>
> 但是我的
>  Could not parse the remainder: (comments[0]).id  1 {% extends "base.html"
> %}  2 {% block content %}  3 
> cellspacing="0" cellpadding="0"> 4 5 6 {{ > (comments[0]).id }} > 我那儿理解错了?谢谢 > > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > 用 comments.0 文档: Behind the scenes Technically, when the template system encounters a dot, it tries the following lookups, in this order: - Dictionary lookup - Attribute lookup - Method call - List-index lookup -- http://codeplayer.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070106/3a59537b/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号