{{ p.source.all }} - is a list of source objects

{{ p.source.all.0 }} - is the first item in the list of source objects (the same as p.source.all[0] in python)

{{ p.source.all.0.some_attribute }} - you access some_attribute of the object source which is the first item in the list od source objects

Martin

On Sun, 11 Sep 2011 10:45:53 +0200, Petey <efri...@gmail.com> wrote:

Ooops I meant source ;)

Firstly:
{{ p.source.all.0 }}  - < gets source name, only first element (as proper
slice should work) but I still dont understand how to get all avaliable
elements for each source in publisher

Secondly:
{{ p.source.url.all.0 }} < does not get URL from Source.url, I really need
an example on accessing other fields

--
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