Re: Passing values to template

2008-11-18 Thread David Zhou
On Tue, Nov 18, 2008 at 1:54 PM, Ross Dakin <[EMAIL PROTECTED]> wrote: > >> Others already gave you practical answers, so this will be mostly a >> more general ('conceptual' ?) advice: don't mix heterogenous data >> (objects, whatever) in a list. If you have a compelling reason (ie : >> ordering)

Re: Passing values to template

2008-11-18 Thread bruno desthuilliers
On 18 nov, 19:54, Ross Dakin <[EMAIL PROTECTED]> wrote: > > Others already gave you practical answers, so this will be mostly a > > more general ('conceptual' ?) advice: don't mix heterogenous data > > (objects, whatever) in a list. If you have a compelling reason (ie : > > ordering) to have het

Re: Passing values to template

2008-11-18 Thread Ross Dakin
> Others already gave you practical answers, so this will be mostly a > more general ('conceptual' ?) advice: don't mix heterogenous data > (objects, whatever) in a list. If you have a compelling reason (ie : > ordering) to have heterogenous data, wrap them all in a same 'meta' > data structure.

Re: Passing values to template

2008-11-17 Thread bruno desthuilliers
On 17 nov, 16:45, Alex Jonsson <[EMAIL PROTECTED]> wrote: > Hey guys, > > I have a news application that I would like some help with. > > My view generates a list with objects mixed with dictionaries with two > objects. (snip) > Or is there a better way of doing this other > than mixing objects

Re: Passing values to template

2008-11-17 Thread Alex Jonsson
Thanks to both of you! David's suggestion fits my application perfectly. Again, big thanks. --~--~-~--~~~---~--~~ 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@goog

Re: Passing values to template

2008-11-17 Thread Rajesh Dhawan
Hi Alex, > I have a news application that I would like some help with. > > My view generates a list with objects mixed with dictionaries with two > objects. Then in my template, I want to loop through this list and > output each value. However, when it encounters a dictionary in the > list I want

Re: Passing values to template

2008-11-17 Thread David Zhou
On Mon, Nov 17, 2008 at 10:45 AM, Alex Jonsson <[EMAIL PROTECTED]> wrote: > So the question is: how do I check (in the template) if the object > that is being run in the for loop is a dictionary, so that I in turn > can run a for loop on it? Or is there a better way of doing this other > than mix