Hello I'm constucting a table in the Django template language, and have this problem. When there is no value (from the dictionary generated by the view), I would like to fill in -1 like this:
<td>{{ item.ActiveSessions|default:"-1" }}</td> However, only the cells that get values are filled in, if no value is available, "-1" is not entered into the table. <td>{{ item.ActiveSessions|default_if_none:"-1" }}</td> also does nothing. Any ideas will be appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---