title: 'User' object has no attribute 'get'
body: <p>I am trying to construct a <code>ModelForm</code> from this solution <a href="https://stackoverflow.com/questions/862522/django-populate-user-id-when-saving-a-model">here</a>, however i am getting this error:</p>
  
  <pre><code>'User' object has no attribute 'get'
  </code></pre>
  
  <p>The idea is to get <code>ModelForm</code> to construct a form that when submitted the user logged in <strong>updates</strong> the entry.</p>
  
  <p>The models.py is:</p>
  
  <pre><code>class UserDetailsForm(ModelForm):
      class Meta:
          model = UserProfile
          fields = ['mobile_phone']
  
      def __init__(self, *args, **kwargs):
          self.request = kwargs.pop('request', None)
          return super(UserDetailsForm, self).__init__(*args, **kwargs)
  
      def save(self, *args, **kwargs):
          kwargs['commit']=False
          obj = super(UserDetailsForm, self)
          if self.request:
              obj.user = UserProfile.objects.get(user=self.request.user)
          obj.save()
  </code></pre>
  
  <p>And my model in models.py is</p>
  
  <pre><code>class UserProfile(models.Model):
      user = models.OneToOneField(User)
      mobile_phone = models.CharField(max_length=30,help_text='Max 30 characters.',blank=True)
      #have shortened this for simplicity
      def __unicode__(self):
          return self.mobile_phone
  </code></pre>
  
  <p>At the request here is a traceback of the issue from views.py:</p>
  
  <pre><code>    userprofile = UserProfile.objects.get(user=request.user)
      if request.method == 'POST':
          form = UserDetailsForm(request.user, request.POST, request.FILES)
          if form.is_valid(): # it dies here
              form.save()
              return HttpResponseRedirect('/members-contact/')
  </code></pre>