Hi,
I wonder if anyone has ideas about the best way to do this.
My field shows up as (None) in the change_list view on admin. I would
love to have a behavior similar to <a href="http://
docs.djangoproject.com/en/dev/ref/templates/builtins/#default-if-
none">default_if_none</a> template tag.
My Ideas --------------------
1. making a new template just for this seems difficult.
2.I could make a function in the model that returns '' if the actual
field is None...
like
cost = models.DecimalField
def display_cost(self):
if self.cost:
return self.cost
else:
return ' '
But if I wanted to do this for many fields it could get pretty ugly
------------------------------------
What would be the best way of these two? Or is there some way I
haven't thought of?