self.reserved_time_start, self.reserved_time_finish = value
@property
- def hosts(self):
- return {alloc.host_name for alloc in self.allocations.all()}
+ def short_host_names(self):
+ return {alloc.host_name.split('.')[0] for alloc in self.allocations.all()}
class Allocation(models.Model):
<td>{{ task.start_time }}</td>
<td>{{ task.finish_time }}</td>
<td>{{ task.get_status_display }}</td>
- <td>{{ task.hosts|join:', ' }}</td>
+ <td>{{ task.short_host_names|join:', ' }}</td>
</tr>
{% endwith %}
{% else %}
<td>{{ task.start_time }}</td>
<td>{{ task.finish_time }}</td>
<td>{{ task.get_status_display }}</td>
- <td>{{ task.hosts|join:', ' }}</td>
+ <td>{{ task.short_host_names|join:', ' }}</td>
</tr>
{% endfor %}
{% endifequal %}