SHARE
TWEET

Untitled

a guest Sep 14th, 2017 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class ProjectForm(ModelForm):
  2.     formfield_callback = make_custom_datefield
  3.     class Meta:
  4.         model = Project
  5.     def __init__(self, **kwargs):
  6.         super(ProjectForm, self).__init__(**kwargs)
  7.  
  8. #        self.fields['owner'].queryset = User.objects.filter(is_staff=True)
  9.         self.fields['owner'].queryset = Contact.objects.filter(user__is_staff=True).exclude(name='')
RAW Paste Data
Top