On 4-7-2012 0:49, Javier Guerra Giraldez wrote:
> On Tue, Jul 3, 2012 at 3:39 PM, Bill Freeman wrote:
>> The obvious ways are:
>>
>> 1. Provide a model method that returns a string representing the type
>> of the instance, compare against that
>> 2. Decorate the instance with an attribute giving t
On Tue, Jul 3, 2012 at 3:39 PM, Bill Freeman wrote:
> The obvious ways are:
>
> 1. Provide a model method that returns a string representing the type
> of the instance, compare against that
> 2. Decorate the instance with an attribute giving the name of the type
> as a string...
3. write a templa
The obvious ways are:
1. Provide a model method that returns a string representing the type
of the instance, compare against that
2. Decorate the instance with an attribute giving the name of the type
as a string...
Can't change the instance (I really think you can still decorate it in
the view,
Here's a workaround I came up with.
I defined a class:
class TableValue:
def __init__(self, value):
self.value = value
self.is_list = isinstance(value, list)
Then in the Template I wrote
{% for row in rows %}
{% f
4 matches
Mail list logo