According to youre link my synthax was correct:

    * Dictionary lookup. Example: foo["bar"]
    * Attribute lookup. Example: foo.bar
    * Method call. Example: foo.bar()
    * List-index lookup. Example: foo[bar]

Anyway none of those work :-(


. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
 XSLT-Entwickler 
LexisNexis
Marxergasse 25, 1030 Wien

mailto:patrick.sz...@lexisnexis.at
Tel.: +43 (1) 534 52 - 1573 
Fax: +43 (1) 534 52 - 146 


-----Ursprüngliche Nachricht-----

Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im 
Auftrag von Tom Evans
Gesendet: Dienstag, 15. Februar 2011 15:24
An: django-users@googlegroups.com
Betreff: Re: list to template

On Tue, Feb 15, 2011 at 2:09 PM, Szabo, Patrick (LNG-VIE)
<patrick.sz...@lexisnexis.at> wrote:
> Hi,
>
> Now when i try to acces that lists with
>
> {{ buchung[0][0] }}
>

This isn't particularly well documented, best I could find is this:

http://docs.djangoproject.com/en/1.2/ref/templates/api/#rendering-a-context

Templates use '.' as a special lookup when used in a variable name.
You can use a dot to do dictionary lookup, attribute lookup, method
calls and list index lookup. What you are trying to do is the latter.

The correct way of doing it is:

{{ buchung.0.0 }}

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to