title: Queryset filtering on Foreignkey in Modelform
body: <p>I have a strange issue when saving a model form. I have a form, which consists of two model forms and I am trying to save them at the same time. For clarity, below is my code</p>
  
  <p><strong>Views.py</strong></p>
  
  <pre><code>def create_user(request):
      if request.method == 'POST':
          user_form = UserForm(request.POST)
          my_user_form = MyUsersForm(request.POST)
  
          if user_form.is_valid() and my_user_form.is_valid():
             us = user_form.save()
             my_us = my_user_form.save(commit=False)
             my_us.user = us
             my_us.save()
             return HttpResponse('You have successfully created a user')
          else:
              return HttpResponse(' My_user_form is not validated')
  
      else:
           user_form = UserForm()
           my_user_form = MyUsersForm(user=request.user)
           return render(request, 'create_user.html', {'user_form': user_form, 'my_user_form': my_user_form})
  </code></pre>
  
  <p>my_user_form is not validated when I override the <strong>init</strong> method of MyUsersForm to filter the queryset of the foreign key(created_by) but when I don"t filter the queryset, my_user_form is validated and the form is saved. </p>
  
  <p>What I don't understand is when I don"t filter the query set how come my_user_form is validated? </p>
  
  <p>The data which is sent via the request.post to my_user_form is somehow lost (when I filter the queryset). any clue in the right direction is highly appreciated. Thank you for your valuable inputs.</p>
  
  <p><strong>Forms.py</strong></p>
  
  <pre><code>class MyUsersForm(ModelForm):
  
      class Meta:
          model = MyUsers
          fields = ['created_by', ]
  
      def __init__(self, user=None, **kwargs):
          super(MyUsersForm, self).__init__(**kwargs)
          if user is not None:
              self.fields['created_by'].queryset = User.objects.filter(username=user)
  </code></pre>
  
  <p><strong>Models.py</strong></p>
  
  <pre><code>class MyUsers(models.Model):
      user = models.OneToOneField(User, blank=True, null=True)
      created_by = models.ForeignKey(User, related_name="created_by", blank=True, null=True)
  </code></pre>