Merge pull request #20 from leephillips/ap

Display full names as well as usernames in the assign_to dropdown when
This commit is contained in:
Scot Hacker 2014-10-06 11:16:05 -07:00
commit 5ea9d3a444

View file

@ -24,6 +24,9 @@ class AddItemForm(ModelForm):
# print dir(self.fields['list'])
# print self.fields['list'].initial
self.fields['assigned_to'].queryset = User.objects.filter(groups__in=[task_list.group])
self.fields['assigned_to'].label_from_instance = lambda obj: "%s (%s)" % (
obj.get_full_name(), obj.username)
due_date = forms.DateField(
required=False,