Chris, Try to print out the entire list object in the template, see if it has anything i.e.
{{ messages }} This should tell you if data is been transfered from your view to the template. Gath On May 21, 7:51 am, Chris Seberino <cseber...@gmail.com> wrote: > I have a model class called Message with an attribute called text. > > ** When I pass a list of these objects called messages to my template, > it doesn't show up. > > ** When I instead create this derivative called fred, that *does* > work... > fred = [e.text for e in messages] > > Why would fred work fine in template but not messages? > > Here is my template code for messages that doesn't show anything on > page.. > > {% for e in messages %} > <p class = "message">{{e.date}}: {{e.text}}</p> > {% endfor %} > > Here is the fred code that does work.. > {% for e in fred %} > <p class = "message">{{e}}</p> > {% endfor %} > > cs -- 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.