+
+ def __init__(self, *args, **kwargs):
+ super(FiltersForm, self).__init__(*args, **kwargs)
+
+ self.fields['host'].choices = tuple(
+ (host, capfirst(host.split('.', 1)[0]))
+ for host in Allocation.objects.values_list('host_name', flat=True).order_by('host_name').distinct())